Reputation: 1186
I have two data frames df1, df2.
I want to update the df1 with value "yes" in the same row number and column number as it is in the df2,
I have attached the image for your reference.
I am using python and pandas.
Upvotes: 0
Views: 17
Reputation: 323226
Using where
and combine_first
df3=df2.where(df2=='Yes').combine_first(df1)
Upvotes: 1