简体   繁体   English

如何从一个 excel Sheet Pandas 中分离多个数据框

[英]How to separate many dataframes from one excel Sheet Pandas

I'm using an excel sheet with many different dataframes on it.我正在使用一个带有许多不同数据框的 Excel 表。 I'd like to import those dataframes but separately.我想单独导入这些数据框。 For now When i import the excel_file with pandas, it creates one single dataframe full of blanks where the dataframe are delimited.现在,当我使用 pandas 导入 excel_file 时,它​​会创建一个充满空白的数据框,其中数据框被分隔。 How can I create a different dataframe for each on of them?如何为它们中的每一个创建不同的数据框?

Thanks谢谢

If you're using the pandas.read_excel() function, you can simply use the usecols parameter to specify which columns you want to include in each dataframe.如果您使用的是pandas.read_excel()函数,您可以简单地使用usecols参数来指定要包含在每个数据帧中的列。 Only downside would be you'd need to do a read_excel call for each of the dataframes you want to read in.唯一的缺点是您需要为要读取的每个数据框执行read_excel调用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从包含许多表的Excel工作表中解析数据帧(使用Python,可能是Pandas) - How to parse dataframes from an excel sheet with many tables (using Python, possibly Pandas) 从 pandas 到一张 excel 工作表的多个数据帧,而不用 python 删除其他工作表 - multiple dataframes from pandas to one excel sheet without deleting other sheets with python 如何将数据帧的字典写到Pandas中的一个excel文件中? 键是工作表名称,值是数据框 - How to write a dict of dataframes to one excel file in Pandas? Key is sheet name, Value is the dataframe 将许多 python pandas 数据框放到一个 excel 工作表中 - Putting many python pandas dataframes to one excel worksheet 如何使用 pandas 从 excel 工作表在同一图形上 plot 多个数据帧? - How can I plot multiple dataframes on the same figure from an excel sheet using pandas? 如何从两个单独的数据框列表合并熊猫数据框 - How to merge pandas dataframes from two separate lists of dataframes 如何一次性创建带有工作表名称的 pandas 数据帧 - How to create pandas dataframes with sheet name in one pass 如何将多个数据框写入一张 Excel 表格? - How do I write multiple dataframes to one excel sheet? 如何阅读 excel 在一张纸和公共索引中包含多个数据帧 - How to read excel with several dataframes in one sheet and common index 熊猫-将多个数据框写入单个Excel工作表 - Pandas - Write multiple dataframes to single excel sheet
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM