Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/16.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 3.x Excel-拼花地板工作表_Python 3.x_Excel_Parquet_Worksheet - Fatal编程技术网

Python 3.x Excel-拼花地板工作表

Python 3.x Excel-拼花地板工作表,python-3.x,excel,parquet,worksheet,Python 3.x,Excel,Parquet,Worksheet,如何将excel工作表转换为拼花地板 我正在尝试读取一个包含多个工作表的excel文件,分别读取每个工作表,并将它们转换为一个单独的拼花地板文件,然后编写同一个文件,有没有办法用Python实现这一点 我正在使用下面显示的代码片段来阅读各个工作表,但我仍停留在转换部分 import pandas as pd import numpy as np #path of the file to be converted path=r'path of the file' #Reading the Ex

如何将excel工作表转换为拼花地板

我正在尝试读取一个包含多个工作表的excel文件,分别读取每个工作表,并将它们转换为一个单独的拼花地板文件,然后编写同一个文件,有没有办法用Python实现这一点

我正在使用下面显示的代码片段来阅读各个工作表,但我仍停留在转换部分

import pandas as pd
import numpy as np

#path of the file to be converted
path=r'path of the file'

#Reading the Excel File
Workbook=pd.ExcelFile(path)

#Reading the Worksheets within the Excel File
Worksheet=Workbook.sheet_names
print(Worksheet)

for sheet in Worksheet:
    converter=pd.read_excel(path,sheet_name=sheet)
    *#print(type(converter))
   # output=converter.to_parquet('converter.parquet.gzip')  " Commented out as it is not working properly"
#a=pd.read_parquet('converter.parquet.gzip')
#print(a)*