Pandas merge two datasets with same number of rows

后端 未结 3 1313
滥情空心
滥情空心 2021-02-09 08:54

I have two tables with same number of rows (second table is computed from first one by processing of text inside T1). I have both of them stored as pandas dataframe. T2 is no co

3条回答
  •  感情败类
    2021-02-09 09:36

    Another way would be to merge on the index values:

    df = T1.reset_index().merge(T2.reset_index(), left_index=True, right_index=True, how='left)
    

提交回复
热议问题