NaN vs. NA — understanding Pandas nullable types

Опубликовано: 16 Июнь 2023
на канале: Python and Pandas with Reuven Lerner
3,378
114

Why does Pandas change the dtype when you set something to NaN? What's pd.NA, and how is it different from the traditional np.NaN? And how can we enforce dtypes, rather than have them change automatically?

In this video, I explain what happens in NumPy, how Pandas is different, and how Pandas is changing to use nullable integer and string types. You'll also see how you can take advantage of these new types in your own data projects.

The Jupyter notebook I used here, along with all notebooks from my YouTube videos, is at https://github.com/reuven/youTube-not....

And if you're a Pandas user, you should check out my weekly Pandas challenges about current events at https://BambooWeekly.substack.com.