2

The datetime_format parameter of pd.ExcelWriter in Pandas is nice to format your datetime output pretty easy before using to_excel(); see here and the answer of jmcnamara, answered Sep 18 '14 at 22:23.

All format settings that are made afterwards are neglected, which is described in Working with Python Pandas and XlsxWriter in the section Formatting of the Dataframe output as well.

I have two questions:

  1. Can I change the font_size of a datetime column that easy as well? Or do I have to take the way through xlswriter and write out the raw data?

  2. Where is the documentation of pd.ExcelWriter()? Shouldn't there be a description which tells you which parameters you can use? I'm just finding a documentation of to_excel(); see here.

Thanks!

  • You could [read the `ExcelWriter` code](https://github.com/pydata/pandas/blob/6c692aee6d411d67997c4fadd023a1d4b7f91c12/pandas/io/excel.py#L550). – ChrisP Apr 24 '16 at 17:23
  • I think lines 550-573 make pretty clear, that it is not possible to change the font size that easy. There is no parameter ... –  Apr 25 '16 at 08:11
  • 1
    Agreed. I think the answers are __(1)__ you will need to subclass the `pandas` class and handle fonts yourself (see [`openpyxl` styles](https://openpyxl.readthedocs.org/en/default/styles.html)) and __(2)__ rely on the docstring I linked to above as your documentation for `ExcelWriter`. – ChrisP Apr 25 '16 at 13:45

0 Answers0