I\'m new to Pandas and I want to merge two datasets that have similar columns. The columns are going to each have some unique values compared to the other column, in addition to
did you try df.drop_duplicates() ?
import pandas as pd dict1 = {'A':[2,2,3,4,5]} dict2 = {'A':[2,2,3,4,5]} df1 = pd.DataFrame(dict1) df2 = pd.DataFrame(dict2) df=pd.merge(df1,df2) df_new=df.drop_duplicates() print df print df_new
Seems that it gives the results that you want