Append column to pandas dataframe

前端 未结 5 867
悲哀的现实
悲哀的现实 2020-11-29 00:12

This is probably easy, but I have the following data:

In data frame 1:

index dat1
0     9
1     5

In data frame 2:

         


        
5条回答
  •  醉梦人生
    2020-11-29 00:34

    Just a matter of the right google search:

    data = dat_1.append(dat_2)
    data = data.groupby(data.index).sum()
    

提交回复
热议问题