I get the following error when running pd.core.format.header_style = None
:
AttributeError Traceback (most recent cal
You're now looking for
pd.formats.format.header_style = None
I believe, as of version 0.18.1
. See the issue CLN & REORG core/common.py #12503.
Edit (version >= 0.20
)
As mentioned by Jeff, this is not a public property and so is prone to move around. Now it is found in pandas.io.formats.excel, which you'll have to import.
If you wanted to handle accessing it from different versions thus far (again, susceptible to change), an adaptation from this incompatibility issue might look something like
import packaging.version
import pandas
import pandas.io.formats.excel
def get_format_module():
version = packaging.version.parse(pandas.__version__)
if version < packaging.version.parse('0.18'):
return pandas.core.format
elif version < packaging.version.parse('0.20'):
return pandas.formats.format
else:
return pandas.io.formats.excel