[Python] Series 요소 개수 확인 :: Series.size
Series 요소 개수 확인 :: Series.size
Reference
Pandas In Actionimport pandas as pd
calories_info = {
'Protein Bar' : 125,
'Salade' : 215,
'Chocolate Bar' : 406,
}
diet = pd.Series(calories_info)
diet
Protein Bar 125
Salade 215
Chocolate Bar 406
dtype: int64
diet.size # diet의 요소 개수
3