Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个大约 20 张的 excel 文件。每个工作表都包含不同类型的数据我想循环 excel 并为每个工作表创建一个数据框,其数据框名称等于工作表名称。
尝试了不同的解决方案但没有成功
sheet_name=None您可以通过以下参数创建 DataFrames 字典read_excel:
sheet_name=None
read_excel
dfs = pd.read_excel(fileName, sheet_name=None) print (dfs['sheetname1']) print (dfs['sheetname2'])