I have two pandas dataframes like below:
df1:
first_11_id spending
94838485868 50
28394958384 25
93482329832 734
df2:
first_15_id savings
948384858684932 43
283949583845488 342
934823298324312 584
I would like to join them on id, and as you can see the first_15_id contains the first 11 digits of first_11_id
Desired output:
first_15_id savings spending
948384858684932 43 50
283949583845488 342 25
934823298324312 584 734
Something like result = df2.join(df1, how = 'inner', on = ?)