Тёмный

NaN vs. NA - understanding Pandas nullable types 

Python and Pandas with Reuven Lerner
Подписаться 20 тыс.
Просмотров 2,8 тыс.
50% 1

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 RU-vid videos, is at github.com/reu....
And if you're a Pandas user, you should check out my weekly Pandas challenges about current events at BambooWeekly.s....

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@somethingness
@somethingness Год назад
Not sure how you make stuff like this so interesting! Amazing teaching!
@ReuvenLerner
@ReuvenLerner Год назад
Thanks so much!
@luism.2050
@luism.2050 Год назад
love it ! Thanks. Great presentation.
@ReuvenLerner
@ReuvenLerner Год назад
Glad you enjoyed it!
@edgeprobability
@edgeprobability 2 месяца назад
W. Been converting cols to floats when dealing w/ NaNs & limiting the # of decimal places. This will be a gamechanger. Thanks brotha. New subscriber here!
@ReuvenLerner
@ReuvenLerner 2 месяца назад
So glad to hear; welcome!
@HG77K
@HG77K Год назад
Are the videos uploaded in a certain order? I didn't find a playlist for pandas.
@ReuvenLerner
@ReuvenLerner Год назад
They aren't in any particular order. But... how did I never think of having a Pandas playlist before? Wow, I'm totally going to set that up in the coming days. Thanks so much for the feedback.
@HG77K
@HG77K Год назад
​@@ReuvenLerner I was right in the middle of an interactive exercise about pandas' pivot tables over at a renowned e-learning website but the informational was not that clear for me so I thought I might just look it up on YT then go back to the exercise, and I found your video on pivot tables. I liked how clear and comprehensive your delivery was and I thought I might throw the rest of the course in the garbage if you had an organized playlist or something. But I would be happily lost in the channel for such good content. Thank you.
@ReuvenLerner
@ReuvenLerner Год назад
@@HG77K My pleasure - and you inspired me to set up a playlist for Pandas, and another one for Jupyter/IPython. Now I'll just keep filling them. Thanks for the kind words and feedback!
@tigreonice2339
@tigreonice2339 9 месяцев назад
Related with selenium: I have an csv file, some cells have NaN value. I want when there's no value (Nan) the driver doesn't fill in the web input(with 'Nan' or nan), just skip it to the next line code instruction.... how can I do that?
@ReuvenLerner
@ReuvenLerner 9 месяцев назад
There might be a setting in read_csv that'll do such a thing. But more likely, you'll need to read the data into Pandas, then use dropna to remove rows containing NaN values.
@smarthumanism3221
@smarthumanism3221 Год назад
I appreciate your content. But would you enlarge the screen content? The latters are a bit too tiny for my bad eyes. But the way you're teaching is brilliant!
@ReuvenLerner
@ReuvenLerner Год назад
Thanks so much for the kind words - and yeah, I'll try to make the text even larger in the future.
@tigreonice2339
@tigreonice2339 9 месяцев назад
5:58 that's what I'm looking for
@ReuvenLerner
@ReuvenLerner 9 месяцев назад
Glad to hear it!
Далее
Boolean indexing in Pandas made simple
8:23
Просмотров 2 тыс.
Pydantic Tutorial • Solving Python's Biggest Problem
11:07
Being Competent With Coding Is More Fun
11:13
Просмотров 81 тыс.
WHY IS THE STACK SO FAST?
13:46
Просмотров 156 тыс.