Post

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

Series 차원 확인 :: Series.shape

Reference Pandas In Action
1
2
3
4
5
6
7
8
9
10
import pandas as pd

calories_info = {
    'Protein Bar' : 125,
    'Salade' : 215,
    'Chocolate Bar' : 406,
}

diet = pd.Series(calories_info)
diet
1
2
3
4
Protein Bar      125
Salade           215
Chocolate Bar    406
dtype: int64
1
diet.shape # diet의 차원 
1
(3,)
This post is licensed under CC BY 4.0 by the author.