How to Remove Duplicate columns in csv and overwrite existing one

I Have a Columns A - H in a CSV file, in that, if there is no change in columns B to F and change in G or H column, BOT needs to overwrite the existing row with the new item (G or H column). How to find the duplicate and remove the existing those 5 columns and update the other two column?

Read the CSV into a datatable. Manipulate the data in the datatable however you need. Write the datatable to a new file. Delete the old file if desired.