I want to join two tables by merge, matching 3 common variables in both tables:
- Df1
job marital month valor
unemployed married june 7
entrepreneur married august 9
- Df2
job marital month valor1
unemployed married june 10
entrepreneur married august 15
I´m using that:
df_nuevo=pd.merge(df1, df2, on='month' and 'marital' and 'job', how='left')
And I´d want to obtain:
- New df:
job marital month valor valor1
unemployed married june 7 10
entrepreneur married august 9 15
But the record are multiplied.
Thanks in advance