No video

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

  Рет қаралды 921

Python and Pandas with Reuven Lerner

Python and Pandas with Reuven Lerner

Жыл бұрын

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.

Пікірлер: 2
@KevinBurns
@KevinBurns Жыл бұрын
Great overview once again , using the OR pipe tends to make the statement pretty messy compared to 'ISIN' good to know it is faster 😀
@ReuvenLerner
@ReuvenLerner Жыл бұрын
To be honest, I figured it was faster when I decided to do this video, but was pretty surprised by *how much* faster it is. So yeah, readability and speed? I'm in!
Boolean indexing in Pandas made simple
8:23
Python and Pandas with Reuven Lerner
Рет қаралды 1,8 М.
Method chaining in Pandas
18:17
Python and Pandas with Reuven Lerner
Рет қаралды 1,9 М.
Logo Matching Challenge with Alfredo Larin Family! 👍
00:36
BigSchool
Рет қаралды 9 МЛН
Кадр сыртындағы қызықтар | Келінжан
00:16
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 17 МЛН
What does int argc, char* argv[] mean?
10:11
Paul Programming
Рет қаралды 350 М.
Comparing values in Pandas with "diff" and "pct_change"
6:46
Python and Pandas with Reuven Lerner
Рет қаралды 698
Selecting rows in Pandas using .loc and lambda
9:04
Python and Pandas with Reuven Lerner
Рет қаралды 996
What Pandas users should know about NumPy 2.0 and dtypes
12:08
Python and Pandas with Reuven Lerner
Рет қаралды 1,1 М.
How do I use the MultiIndex in pandas?
25:01
Data School
Рет қаралды 173 М.
JavaScript Loops - Code This, Not That
8:36
Fireship
Рет қаралды 346 М.
Flipping Data with Pandas: Stack & Unstack
8:17
Python and Pandas with Reuven Lerner
Рет қаралды 2,6 М.