I have 2 dataframes df1 and df2 having columns as df1['date','customer_id','category_name']
and df2['date','customer_id','category_name']
. I want values from df1 which matches in df2 on columns 'customer_id' & 'category_name'.
So I tried this:
df_final = df1[(df1['customer_id']==df2['customer_id'])&(df1['category_name']==df2['category_name'])]
but it is showing 'ValueError: Can only compare identically-labeled Series objects' dataframes