将多个熊猫数据框放入一个以网格格式的Excel表中
因此,我有一个非常大的数据框架,该框架由超过70个较小的数据范围组成,每个数据范围为10行。我想使用XLSXWriter将其写入Excel表中;但是,我希望以网格格式显示数据框,以便它们不仅仅放置向西或向北到南。我所需的输出如下所示。
So, I have one very large Dataframe that is composed of over 70 smaller dataframes, of ten rows each. I want to use xlsxwriter to write them into an excel sheet; however, I want the dataframes to be displayed in a grid format, so that they do not simply place going east to west or north to south. My desired output is shown below.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需使用
startCol
和startrow
来自 dataframe.to_excel使用df.Shape获取所需的Col/Row位置。为标题分配空间
Just use the
startcol
andstartrow
from DataFrame.to_excelUse df.shape to get the desired col/row position. Allocate space for the headers