簡體   English   中英

python pandas read_excel返回一個AssertionError:導入帶有圖像的文件

[英]python pandas read_excel return an AssertionError: importing a file with images

我無法在Ipython筆記本中使用pandas庫中的read_excel方法。 在Excel文件中進行了一些測試和清理之后,我知道它們是圖紙(或圖像)的完整列。 當我刪除此列時,我停止了錯誤消息。 有人知道如何配置read_excel選項以僅收集數據嗎? 這是我的代碼:

import pandas as pd
import os
# File selection
userfilepath = r'C:\Temp'
filename = "exportCS12.xlsx"
filenameCS12 = os.path.join(userfilepath, filename)
print(filenameCS12)
# workbook upload
df = pd.read_excel(filenameCS12, sheetname='Sheet1')

由於未清除excel文件,因此無法導入熊貓。 使用openpyxl解決問題,僅能在經過驗證的區域中以excel導航。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM