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

Published: 09 August 2023
on channel: Python and Pandas with Reuven Lerner
1,017
54

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.


Watch video Using | in Pandas? Consider the "isin" method instead online, duration hours minute second in high quality that is uploaded to the channel Python and Pandas with Reuven Lerner 09 August 2023. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 1,017 times and liked it 54 visitors.