728x90
In [1]:
import pandas as pd
In [3]:
prices = pd.read_csv('/content/sample_data/prices.csv', squeeze=True)
In [7]:
prices
Out[7]:
0 2.55
1 3.39
2 2.75
3 3.39
4 3.39
...
541905 2.10
541906 4.15
541907 4.15
541908 4.95
541909 18.00
Name: Price, Length: 541910, dtype: float64
In [4]:
# the length of the Series
len(prices)
Out[4]:
541910
In [5]:
# the maximum value of the Series
max(prices)
Out[5]:
38970.0
In [6]:
# the minimum value of the Series
min(prices)
Out[6]:
-11062.06
In [16]:
# unique values
set(prices)
# pick up 5 values of unique values
list(set(prices))[0:5]
Out[16]:
[0.0, 1.25, 2.75, 3.75, 4.25]
728x90
댓글