October 2019
Beginner to intermediate
674 pages
16h 43m
English
Here is an example of using the pandas isin() function:
In [11]: stock_symbols=stocks_df.Symbol
stock_symbols
Out[11]: 0 GOOG
1 AMZN
2 FB
3 AAPL
4 TWTR
5 NFLX
6 LNKD
Name: Symbol, dtype: object
In [10]: stock_symbols.isin(['GOOG','NFLX'])
Out[10]: 0 True
1 False
2 False
3 False
4 False
5 True
6 False
Name: Symbol, dtype: bool
Read now
Unlock full access