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
You need reset_index()
before concat
for default indices:
df = pd.concat([T1.reset_index(drop=True),T2.reset_index(drop=True)], axis=1)
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)
I want to add that pd.concat can do what you want by just providing the axis as columns. like this:
pd.concat([T1,T2],axis=1)