Comapare the values of same column name of two different dataframes




Have a requirement that
have dataframe1 has columns [‘sheet’,‘Date’,‘Processed_date’]
have dataframe2 has columns [‘sheet’,‘Date’,‘Processed_date’]

now I have to compare the value of ‘sheet’ of two dataframe - if the values is same then have to update the date and process date to excel sheet.
if value of '‘sheet’ column is not same then have to insert.

insert works fine but how to update the other columns if the sheet value is same.

Any leads thank you.



Hi @sachin123456,

If you are able to compare the values in the ‘sheet’ column for every row, in both the dataframes, you can store the row number and then update the other columns for that particular row.

In other words, if you have a loop that checks - Dataframe1, row1 -> compare ‘sheet’ with every row of dataframe2, and suppose the values are same as row 16. You can update row1 of dataframe 1 with values in row 16 of dataframe 16.