Adding new column to existing DataFrame in Python pandas

后端 未结 25 1234
你的背包
你的背包 2020-11-22 01:15

I have the following indexed DataFrame with named columns and rows not- continuous numbers:

          a         b         c         d
2  0.671399  0.101208 -         


        
25条回答
  •  北恋
    北恋 (楼主)
    2020-11-22 01:37

    x=pd.DataFrame([1,2,3,4,5])
    
    y=pd.DataFrame([5,4,3,2,1])
    
    z=pd.concat([x,y],axis=1)
    

提交回复
热议问题