pandas to_datetime() then concat() on DateTime Index

后端 未结 2 1056
囚心锁ツ
囚心锁ツ 2021-01-19 04:32

I\'m trying to merge 2 DataFrames using concat, on their DateTime Index, but it\'s not working as I expected. I copied some of this code from the example in the

2条回答
  •  借酒劲吻你
    2021-01-19 04:36

    You need axis=1:

    pd.concat([df,df2], axis=1)
    

    Output:

                value    0
    2015-02-04    444  222
    2016-03-05    555  333
    

提交回复
热议问题