News for hackers. Stuff that matters.
Re:Make your programs run faster by better using the data ca... by chaxor on Friday June 23, 2023 @11:39PM (#36455296)
I'm confused by some of this. Specifically, pandas columns are essentially just a thin wrapper around record arrays in numpy right? How could it be that much faster to use numpy over pandas if it's effectively the same thing?
Re:Make your programs run faster by better using the data ca... by anywhichway on Saturday June 24, 2023 @01:51AM (#36455950)
Right, each pandas column is a numpy array (or optionally pyarrow in pandas 2.0), but numpy is going to be faster for things that needs to be vectorized across columns, such as matrix operations.
Re:Make your programs run faster by better using the data ca... by jamann on Saturday June 24, 2023 @06:44AM (#36457437)
Thats when you do polars.DataFrame.to_numpy()