alexa

How do I compare 2 csv files for differences Pandas in python ?

How do I compare 2 csv files for differences  Pandas in python ?

you can try this:

 df1 = pd.read_csv("file1.csv")
df2 = pd.read_csv("file2.csv")

fullDf = pd.concat([df1,df2])
fullDf = fullDf[fullDf.duplicated(keep=False) == False]
fullDf.to_csv("answer.csv", index=False)

196 0
7

Write a Comments


* Be the first to Make Comment

GoodFirms Badge
GoodFirms Badge

Fix Your Meeting With Our SEO Consultants in India To Grow Your Business Online

Facebook
Twitter
LinkedIn
Instagram
Whatsapp
Call Now
Quick Inquiry