Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pd.merge duplicate columns remove

#Create test data
df1 = pd.DataFrame(np.random.randint(100,size=(1000, 3)),columns=['A','B','C'])
df2 = pd.DataFrame(np.random.randint(100,size=(1000, 3)),columns=['B','C','D'])

pd.merge(df1, df2, how='inner', left_on=['B','C'], right_on=['B','C'])
Source by www.pauldesalvo.com #
 
PREVIOUS NEXT
Tagged: #duplicate #columns #remove
ADD COMMENT
Topic
Name
7+9 =