pandas.errors.CSSWarning#
- exception pandas.errors.CSSWarning[源代码]#
当 CSS 样式转换失败时会引发警告。
这可能是因为样式没有等效值,或者样式格式不正确。
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: Unhandled color format: 'blueGreenRed'