Pandas merge two datasets with same number of rows

后端 未结 3 2031
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-09 09:10

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:31

    You need reset_index() before concat for default indices:

    df = pd.concat([T1.reset_index(drop=True),T2.reset_index(drop=Tru‌​e)], axis=1)
    

提交回复
热议问题