pandas.errors.CSSWarning#
- exception pandas.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.map(lambda x: "background-color: blueGreenRed;").to_excel( ... "styled.xlsx" ... ) CSSWarning: Unhandled color format: 'blueGreenRed' >>> df.style.map(lambda x: "border: 1px solid red red;").to_excel( ... "styled.xlsx" ... ) CSSWarning: Unhandled color format: 'blueGreenRed'