将多个熊猫数据框放入一个以网格格式的Excel表中

发布于 2025-01-31 12:26:03 字数 263 浏览 4 评论 0原文

因此,我有一个非常大的数据框架,该框架由超过70个较小的数据范围组成,每个数据范围为10行。我想使用XLSXWriter将其写入Excel表中;但是,我希望以网格格式显示数据框,以便它们不仅仅放置向西或向北到南。我所需的输出如下所示。

![1]: https://i.sstatic.net/ru9tf.png

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.

![1]: https://i.sstatic.net/rU9tF.png

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北城半夏 2025-02-07 12:26:03

只需使用startColstartrow 来自 dataframe.to_excel

使用df.Shape获取所需的Col/Row位置。为标题分配空间

Just use the startcol and startrow from DataFrame.to_excel

Use df.shape to get the desired col/row position. Allocate space for the headers

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文