News for hackers. Stuff that matters.
Re:Pandas v2.0 Released by red_hare on Monday April 03, 2023 @12:00PM (#35426070)
Biggest performance games most people will see will be dealing with strings when using the pyarrow backend since those are now a native type and not wrapped in a python object.

But for people who are looking for the performance polars gives with all the nice APIs of pandas, the big news is, since polars and pandas will now both use arrow for the underlying data, you can convert between the two kinds of dataframes without copying the data itself.

    polars_df = polars.from_pandas(df)
    # ... do performance heavy stuff ...
    df = polars.to_pandas(polars_df)
There's a good article on it here: https://datapythonista.me/blog/pandas-20-and-the-arrow-revol...

There are no comments on this comment yet.