machow / siuba

Python library for using dplyr like syntax with pandas and SQL
https://siuba.org
MIT License
1.14k stars 48 forks source link

Potential performance issue: .to_json memory leak in pandas below 1.4 version #481

Open TendouArisu opened 5 months ago

TendouArisu commented 5 months ago

Issue Description:

Hello. I have discovered a performance degradation in the .to_json function of pandas version below 1.4. And I notice the repository depends on pandas 1.2.5 in requirements.txt. I am not sure whether this performance problem in pandas will affect this repository. I found some discussions on pandas GitHub related to this issue, including #43877 and #45489. I also found that siuba/ops/support/base.py and siuba/experimental/pivot/sql_pivot_long.py used the influenced api. There may be more files using the influenced api.

Suggestion

I would recommend considering an upgrade to a different version of pandas >= 1.4 or exploring other solutions to optimize the performance of .to_json. Any other workarounds or solutions would be greatly appreciated. Thank you!