Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/278.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python pandas vs mysql为windows创建报告生成器_Python_Mysql_Excel_Pandas_Automation - Fatal编程技术网

Python pandas vs mysql为windows创建报告生成器

Python pandas vs mysql为windows创建报告生成器,python,mysql,excel,pandas,automation,Python,Mysql,Excel,Pandas,Automation,我有一个“excel文件形式的数据库”用于生成报告,我想构建一个应用程序,使用与该数据库的数据交换来生成报告,在windows上,我正在尝试通过此学习, 1-我是不是在浪费时间,应该改用另一种方法 2-我需要自动创建数据框,因此我尝试从excel表中提取数据框的列名 3-我设法将第一行“列名”存储在列表中,如何使用此列表创建具有heders的数据帧 import pandas as pd import os import xlrd cwd = os.getcwd() book = xlrd.

我有一个“excel文件形式的数据库”用于生成报告,我想构建一个应用程序,使用与该数据库的数据交换来生成报告,在windows上,我正在尝试通过此学习, 1-我是不是在浪费时间,应该改用另一种方法 2-我需要自动创建数据框,因此我尝试从excel表中提取数据框的列名

3-我设法将第一行“列名”存储在列表中,如何使用此列表创建具有heders的数据帧

import pandas as pd
import os
import xlrd 

cwd = os.getcwd()
book = xlrd.open_workbook('LISTERC.xlsx')
sheet = book.sheet_by_name("Sheet1")

count = 0
hdr = []
for c in range(10):
    if (sheet.cell(0,c).value != ''):
    count +=1
    hdr.append (sheet.cell(0,c).value)


DF = pd.DataFrame(*zip(hdr))

你可以用我认为最好把你的问题分成多个问题。人们很难一下子回答太多问题。