0
我已經試過以下(PD是大熊貓):如何使用Pandas分割大型Excel文件?
for i, chunk in pd.read_excel(os.path.join(INGEST_PATH,file), chunksize=5):
,但我收到此錯誤:
NotImplementedError: chunksize keyword of read_excel is not implemented
我試圖尋找其他方法,但其中大部分是CSV文件,而不是xlsx,我也有熊貓版本0.20.1
任何幫助表示讚賞。
您是否嘗試過這些解決方案? https://stackoverflow.com/questions/38623368/reading-a-portion-of-a-large-xlsx-file-with-python/38623545 –
我不熟悉'chunksize'。一種可能性,你可以先讀取excel到一個數據框中,然後用'numpy.array_split'或類似的東西來拆分數據框的索引。 – zyxue
@RileyHun我試過兩個,得到相同的塊大小錯誤。 – Pear