PERF: Excel Styler treatment of CSS side expansion is slow #47352
Labels
IO Excel
read_excel, to_excel
Needs Triage
Issue that has not been reviewed by a pandas team member
Performance
Memory or execution speed performance
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this issue exists on the latest version of pandas.
I have confirmed this issue exists on the main branch of pandas.
Reproducible Example
The styler approach to resolving CSS string expansion for conversion to Excel is slow. In particular:
atomize
contains an inefficient string addition and replace.CSSResolver
orCSSToExcelConverter
On my machine, this example took 12.2s to run. Of that time, 6.57s was cumulatively spent in
css.py:CSSResolver.__call__
, including 2.37s inparse
and 1.5s inatomize
.Installed Versions
Replace this line with the output of pd.show_versions()
Prior Performance
No response
The text was updated successfully, but these errors were encountered: