Currently with pandas, I could save various dataframes (of different size) to the same excel sheet, with startrow and startcol to specify the location.
with pd.ExcelWriter(dump_excel) as writer:
dataframe1.to_excel(writer, sheet_name='sheet1', startrow=40, startcol=0)
dataframe2.to_excel(writer, sheet_name='sheet1', startrow=0, startcol=0)
dataframe3.to_excel(writer, sheet_name='sheet2', startrow=0, startcol=0)
I would like to know, if I can read various dataframe1 and dataframe2 respectively.
看一下read_excel
的文档 ,您会对其某些参数( skiprows
, skip_footer
和parse_cols
)感到惊讶。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.