gpt4 book ai didi

python - 在哪里可以找到 ExcelWriter 文档

转载 作者:太空宇宙 更新时间:2023-11-03 14:50:30 25 4
gpt4 key购买 nike

我想使用 ExcelWriter 类。尽管 ExcelWriter 可以像 this 中那样用 pd.ExcelWriter 调用帖子,我在 Pandas API 中找不到任何相关信息.那么我在哪里可以找到文档?

最佳答案

您可能想阅读 "Working with Python Pandas and XlsxWriter" documentationPandas Cookbook IO (Excel) .

另一个有用的选项是使用交互式 Python shell,如 ipythonJupyter Notebook - 只需键入函数/方法/构造函数名称,然后输入 ? (问号)并按 Enter - 它会显示一个 docstring

ipython 中的演示:

In [84]: pd.ExcelWriter?
Init signature: pd.ExcelWriter(path, engine=None, **kwargs)
Docstring:
Class for writing DataFrame objects into excel sheets, default is to use
xlwt for xls, openpyxl for xlsx. See DataFrame.to_excel for typical usage.

Parameters
----------
path : string
Path to xls or xlsx file.
engine : string (optional)
Engine to use for writing. If None, defaults to
``io.excel.<extension>.writer``. NOTE: can only be passed as a keyword
argument.
date_format : string, default None
Format string for dates written into Excel files (e.g. 'YYYY-MM-DD')
datetime_format : string, default None
Format string for datetime objects written into Excel files
(e.g. 'YYYY-MM-DD HH:MM:SS')

Notes
-----
For compatibility with CSV writers, ExcelWriter serializes lists
and dicts to strings before writing.

关于python - 在哪里可以找到 ExcelWriter 文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46173710/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com