【问题标题】:Where can I find the ExcelWriter documentation在哪里可以找到 ExcelWriter 文档
【发布时间】:2018-02-20 18:12:09
【问题描述】:

我想使用 ExcelWriter 类。虽然 ExcelWriter 可以像 this 帖子中那样使用 pd.ExcelWriter 调用,但我在 Pandas API 中找不到任何有关它的信息。那么在哪里可以找到文档呢?

【问题讨论】:

    标签: python excel pandas


    【解决方案1】:

    您可能想阅读"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.
    

    【讨论】:

      猜你喜欢
      • 2013-09-04
      • 1970-01-01
      • 1970-01-01
      • 2023-03-16
      • 1970-01-01
      • 2019-08-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多