Using | in Pandas? Consider the 'isin' method instead

preview_player
Показать описание
If you're looking to see if a Pandas series contains any of several values, then you might be tempted to use several | operators strung together. It turns out that the "isin" method is not only more readable, but runs much faster, as I show in this video.
Рекомендации по теме
Комментарии
Автор

Great overview once again, using the OR pipe tends to make the statement pretty messy compared to 'ISIN' good to know it is faster 😀

KevinBurns