Add indexed column to DataFrame with pandas

前端 未结 2 1638
说谎
说谎 2021-02-19 13:24

I\'m a beginning pandas user, and after studying the documentation I still can\'t find a straightforward way to do the following.

I have a DataFrame with a pandas.DateR

相关标签:
2条回答
  • 2021-02-19 14:09

    df['C'] = df2['C'] should also work in this case.

    0 讨论(0)
  • 2021-02-19 14:21

    Do df.join(df2):

    http://pandas.pydata.org/pandas-docs/stable/merging.html#joining-on-index

    0 讨论(0)
提交回复
热议问题