I have two data frames, let's say
df1
UserID val1 val2
1a 20 36.5
2b 22 39.
4d NA NA
df2
UserID top1 top2
2b 328. 95.
3c 1.1 2.2
1a 3 NA
My expected result is
df3
UserID val1 val2 top1 top2
2b 22 39. 328. 95.
1a 20 36.5 3 NA
Everytime I try to do this, I either wind up with excess rows, or excess columns (UserID appearing twice) and I'm not sure what I'm doing wrong.
My most recent attempt was
pd.concat( [df1, df2], axis=1, join_axes=['UserID'] )
Thanks