pandas-两个Series拼接合并为一个DataFrame(pd.concat)

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
posted @ 2020-06-12 11:02  木,曰曲直  阅读(15927)  评论(0编辑  收藏  举报