On this page
pandas.errors.CSSWarning
- exceptionpandas.errors.CSSWarning[source]
-
Warning is raised when converting css styling fails.
This can be due to the styling not having an equivalent value or because the styling isn’t properly formatted.
Examples
>>> df = pd.DataFrame({'A': [1, 1, 1]}) >>> df.style.applymap(lambda x: 'background-color: blueGreenRed;') ... .to_excel('styled.xlsx') ... # CSSWarning: Unhandled color format: 'blueGreenRed' >>> df.style.applymap(lambda x: 'border: 1px solid red red;') ... .to_excel('styled.xlsx') ... # CSSWarning: Too many tokens provided to "border" (expected 1-3)
© 2008–2022, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/1.5.0/reference/api/pandas.errors.CSSWarning.html