[英]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.