I have 2 pandas dataframes. I am trying to update df with values from df2 based on matching index's.
df
Url_Sub_Fld ip
0 tel na
1 li na
2 192.22.25.26 192.22.25.26
df2
Url_Sub_Fld
1 test_string
Desired output:
df
Url_Sub_Fld ip
0 tel na
1 test_string na
2 192.22.25.26 192.22.25.26
df.update(df2)works fine or evenfinal=df2.combine_first(df), note update is an inplace operation.