if both df have the same size the you can iterate just like a regular matrix
# go through the rows
for row in range(total_rows):
# go through the columns
for column in range(total_columns):
#make the condition if they match
if df[row][column] == df1[row][column]:
# now just assign the value from df1 to df
df[row][column] = df1[row][column]
i hope this solves your issue:)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.