Search-and-replace Pandas values with 'where' and 'mask'

preview_player
Показать описание
Want to replace some values, but not others, in your Pandas series or data frame? In this video, I introduce "where" and "mask", which help you accomplish this.
Рекомендации по теме
Комментарии
Автор

Another great video👍 Just wondering if there were any specific reason why did not use pd.NA? Perhaps it's the same result in the end, when it comes to floats 🤷

imothar
Автор

How do i use np.NaN in a way that does NOT change ints to floats?

marcinpohl