728x90
In [1]:
import pandas as pd
In [2]:
prices = pd.read_csv('/content/sample_data/prices.csv', squeeze=True)
In [6]:
# Check if a given number exists in a pandas Series values
5.79 in prices.values
Out[6]:
True
In [7]:
# Check if a given number exists in a pandas Series index
5.79 in prices.index
Out[7]:
False
In [8]:
# 'in' will search in pandas index by default
5.79 in prices
Out[8]:
False
728x90
'Data Analytics with python > [Data Analysis]' 카테고리의 다른 글
[Pandas][Series]S1_12_Slicing (0) | 2023.01.17 |
---|---|
[Pandas][Series]S1_11_Indexing (0) | 2023.01.17 |
[pandas][Series] S1_09_Math Operations (0) | 2023.01.17 |
[Pandas][Series] S1_06_Reading data (CSV) (0) | 2023.01.17 |
[Pandas][Series] S1_05_Methods: 기본 함수 (0) | 2023.01.17 |
댓글