Skip to content

Instantly share code, notes, and snippets.

@koaning
Created November 1, 2021 20:54
Show Gist options
  • Select an option

  • Save koaning/5a0f3f27164859c42da5f20148ef3856 to your computer and use it in GitHub Desktop.

Select an option

Save koaning/5a0f3f27164859c42da5f20148ef3856 to your computer and use it in GitHub Desktop.
A benchmark with Polars.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wgong

wgong commented Mar 29, 2023

Copy link
Copy Markdown
polars (0.16.16)       4.9s
pandas (1.5.3)       28.2s

pandas (2.0.0rc1) throws an error: <class 'numpy.intc'>
my code for comparison is at https://github.com/wgong/py4kids/blob/master/lesson-14.6-polars/polars-cookbook/cookbook/pandas_vs_polars.py#L532

@koaning

koaning commented Mar 29, 2023

Copy link
Copy Markdown
Author

I would not have expected .transform() to be slower than .join()!

But yeah, I'll also poke around some more here, but thanks for the reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment