Pandas column bind (cbind) two data frames

后端 未结 1 538
故里飘歌
故里飘歌 2020-12-13 23:43

I\'ve got a dataframe df_a with id information:

    unique_id lacet_number 
15    5570613  TLA-0138365 
24    5025490  EMP-0138757 
36    435443         


        
相关标签:
1条回答
  • 2020-12-13 23:49

    If you're sure the index row values are the same then to avoid the index alignment order then just call reset_index(), this will reset your index values back to start from 0:

    df_c = pd.concat([df_a.reset_index(drop=True), df_b], axis=1)
    
    0 讨论(0)
提交回复
热议问题