In [1]:
import pandas as pd
In [2]:
df1 = pd.DataFrame({
'name':['john','mary'],
'age':[24,45]
})
df1
Out[2]:
In [23]:
df2 = pd.DataFrame({
'name':['mary','john'],
'age':[45,89]
})
df2
Out[23]:
In [25]:
pd.concat([
df1,df2
],ignore_index=True)
Out[25]:
In [24]:
pd.concat([
df1,df2
],ignore_index=True).drop_duplicates().reset_index(drop=True)
Out[24]:
In [ ]:
In [30]:
pd.concat([
df1,df2
],axis=1)
Out[30]:
In [31]:
pd.concat([
df1,df2
],axis=1).reset_index(drop=True)['age']
Out[31]:
In [ ]: