excel header_style broken in 0.22
See original GitHub issueimport pandas as pd
pd.io.formats.excel.header_style = None
After updating, it is no longer possible to override the excel header styles.
Previously, this was possible in 0.19.2:
pd.formats.format.header_style = None
It seems header_style has been moving around constantly lately… Can we please put it somewhere and leave it there??? Or, if it’s going to be moved constantly, it should live on a private module path. I realize python doesn’t have private scoping, but there are paths in the pandas module that are privately scoped, by convention, yet don’t follow the standard python convention of underscoring the names.
How are we supposed to accomplish the removal of styles on the latest build?
That module path DOES indeed exist… but something is wonky with the imports, it seems.
Exception is raised:
AttributeError: 'module' object has no attribute 'excel'
Possibly related? https://github.com/pandas-dev/pandas/pull/15530
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
From version 0.24 (Jan 25, 2019) this is now required:
import pandas.io.formats.excel
pandas.io.formats.excel.ExcelFormatter.header_style = None
currently still working for pandas version 1.2.4 (Apr 12, 2021)
There isn’t a currently exposed way of doing this. #25185 is open if you’d like to take a look and contribute something on that front