0

Using Pandas, I want to compare 2 csv files. Both files have same data but in 2nd file, some rows will be deleted, some will be inserted and some will be modified. I want to compare both the files and find out the deleted, inserted and modified row.

2

1 Answer 1

0

A simple way to do this is to use:

df1[~df1.apply(tuple,1).isin(df2.apply(tuple,1))] 
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for your comment, but this shows only the difference. I want to know the inserted rows too.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.