I am trying to write a pandas DataFrame to an .xlsx file where different numerical columns would have different formats. For example, some would show o
DataFrame
.xlsx
As you rightly point out applying formats to individual cells is extremely inefficient.
openpyxl 2.4 includes native support for Pandas Dataframes and named styles.
https://openpyxl.readthedocs.io/en/latest/changes.html#id7