Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas merge but keep certain columns

df = pd.merge(df,df2[['Key_Column','Target_Column']],on='Key_Column', how='left')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #merge #columns
ADD COMMENT
Topic
Name
1+1 =