nada

[Python] Series 차원 확인 :: Series.shape 본문

Python/Pandas

[Python] Series 차원 확인 :: Series.shape

ds-nada 2023. 8. 15. 23:50

Series 차원 확인 :: Series.shape

Reference Pandas In Action
import 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.shape # diet의 차원 
(3,)