Note
Pandas (15) 본문
728x90
How to stack two series vertically and horizontally ?
# Input
ser1 = pd.Series(range(5))
ser2 = pd.Series(list('abcde'))
# Output
# Vertical
ser1.append(ser2)
# Horizontal
df = pd.concat([ser1, ser2], axis=1)
print(df)
'Pandas' 카테고리의 다른 글
Pandas (17) (0) | 2022.08.08 |
---|---|
Pandas (16) (0) | 2022.08.07 |
Pandas (14) (0) | 2022.08.05 |
Pandas (13) (0) | 2022.08.03 |
Pandas (12) (0) | 2022.08.02 |
Comments