-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use pandas ujson in JSON loader to improve performance #6874
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Before pandas-2.2.0, the function import ujson_loads as loads |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great ! do you know what the speed-up is (roughly) ?
Thanks for your review, @lhoestq. The performance gain depends on many factors, such as underlying data structures, file size... In my benchmark, the performance gain was around 8.1%. |
Show benchmarksPyArrow==8.0.0 Show updated benchmarks!Benchmark: benchmark_array_xd.json
Benchmark: benchmark_getitem_100B.json
Benchmark: benchmark_indices_mapping.json
Benchmark: benchmark_iterating.json
Benchmark: benchmark_map_filter.json
Show updated benchmarks!Benchmark: benchmark_array_xd.json
Benchmark: benchmark_getitem_100B.json
Benchmark: benchmark_indices_mapping.json
Benchmark: benchmark_iterating.json
Benchmark: benchmark_map_filter.json
|
* Use pandas ujson in JSON loader * Fix renaming of ujson_loads to loads before pandas-2.1.0 * Fix pandas version in comment
Use pandas ujson in JSON loader to improve performance.
Note that
datasets
haspandas
as required dependency. Andpandas
includesujson
inpd.io.json.ujson_loads
.Fix #6867.
CC: @natolambert