pandas-两个Series拼接合并为一个DataFrame(pd.concat)
时间:2020-06-12 14:35:57
收藏:0
阅读:544
a_series = pd.Series(["a", "b", "c"], name="Letters")
another_series = pd.Series([1, 2, 3], name="Numbers")
df = pd.concat([a_series, another_series], axis=1)
#merge `a_series` and `another_series`
print(df)
OUTPUT
Letters Numbers
0 a 1
1 b 2
2 c 3
原文:https://www.cnblogs.com/muyuequzhi/p/13098236.html
评论(0)