Simplified. I have 2 dataframes that I would like to merge/concatenate/join together into one using the following scenario as framework.
df1 looks like
C1 C2 C3
0 1659712000.0 1659712000.0 YQHDK
1 5797862000.0 5797862000.0 YQHJW
2 846369000.0 846369000.0 YQHMF
3 508287000.0 508287000.0 YQHRV
4 878002000.0 878002000.0 YQHVT
5 NaN 5178784324.0 YQHRM
While df2 looks like
C3 C1
0 YQHRM 2362463460.0
What I desire is to fill in the NaN value as follows:
C1 C2 C3
0 1659712000.0 1659712000.0 YQHDK
1 5797862000.0 5797862000.0 YQHJW
2 846369000.0 846369000.0 YQHMF
3 508287000.0 508287000.0 YQHRV
4 878002000.0 878002000.0 YQHVT
5 2362463460.0 5178784324.0 YQHRM
I've tried using df1.merge(df2, how='left', on='C3), but this creates two C1 columns, a C1_x and a C1_y.
I've also tried using pd.concat([df1, df2]) but this results in two rows for YQHRM'.
What am I missing here?