Joining Multiple Dataframes with Pandas with overlapping Column Names?

后端 未结 2 909
囚心锁ツ
囚心锁ツ 2020-12-16 00:27

I have multiple (more than 2) dataframes I would like to merge. They all share the same value column:

In [431]: [x.head() for x in data]
Out[431]: 
[                 


        
2条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-16 01:17

    In [65]: pd.concat(data, axis=1)
    Out[65]:
                         AvgStatisticData  AvgStatisticData  AvgStatisticData  AvgStatisticData
    2012-10-14 14:00:00         39.335996         47.854712         54.171233         65.813114
    2012-10-14 15:00:00         40.210110         55.041512         48.718387         71.397868
    2012-10-14 16:00:00         48.282816         55.488026         59.978616         76.213973
    2012-10-14 17:00:00         40.593039         51.688483         50.984514         72.729002
    2012-10-14 18:00:00         40.952014         57.916672         54.924745         73.196415
    

提交回复
热议问题