DataFrame rename method is extremely slow for dictionary argument #17336
Labels
bug
Something isn't working
needs triage
Awaiting prioritization by a maintainer
performance
Performance issues or improvements
python
Related to Python Polars
Checks
Reproducible example
Time for rename(): 117.57077859994024 | Version: 1.0.0
Log output
No response
Issue description
The example code takes around two minutes to run, tested in versions 0.20.31 and 1.0.0
Expected behavior
It shouldn't be that slow.
Passing a function is much faster, even
lambda col: cols_map.get(col, col)
:Time for rename(): 0.4511210999917239 | Version: 1.0.0
Installed versions
The text was updated successfully, but these errors were encountered: