What Pandas users should know about NumPy 2.0 and dtypes

preview_player
Показать описание
If you use Pandas, then you're also (indirectly) using NumPy. And NumPy 2.0, which was released earlier this week, introduces a bunch of changes — including changes to what happens when you broadcast math operations to a Pandas series.

In this video, I explain the old behavior and the new one, consider what this means, and give you some ways to think about and handle it.

(The video was already long, so I didn't mention — but perhaps should have — that you can always use "astype" to get a new series back, with a different dtype, if you want to perform a conversion. You just have to do it explicitly, rather than expecting automatic promotion.)

Рекомендации по теме
Комментарии
Автор

great content!
do you know if Numpy 2.0 brings performance speedup? If it does, I'm hoping it will speedup up Pandas as well! I've been holding off migrating to Polars due to the 30-50k loc Pandas code I got.

Would rather not having to refactor them and stay with Pandas if there's major speedup with the new Numpy 2.0

pietraderdetective
Автор

Thank You for this video, i just wanted to know if we can run both by summoning one version when the other isn't needed or maybe have both of them and invoking a specific version?

My English is weak, as i originate from a rural area of India and English is my 9th spoken language in day to day communications.

- Samuel

abc_cba