Comparing Value Difference Between 2 CSV Files using pandas

preview_player
Показать описание
In this tutorial, I am going to show you how to use pandas library to compare two CSV files using Python.

Buy Me a Coffee? Your support is much appreciated!
-------------------------------------------------------------------------------------
🔑Venmo: @Jie-Jenn

Support my channel so I can continue making free contents
---------------------------------------------------------------------------------------------------------------

#Pandas #DataAnalysis #DataAnalaytics
Рекомендации по теме
Комментарии
Автор

Thanks a lot. I knew about method 2 and use it on daily basis for my data analysis task at office. The 1st method was completely new to me. Thank you so much for showing me a different way to achieve this. This just proves Python is a huge ocean and one can learn something new everyday.

saktibiswal
Автор

Watched again and still love it! Great job!!!!

torque
Автор

Dude, you save me a lot of work with the method 2,

alanarturovargasandrade
Автор

Is there any option to highlight exactly mismatch column in different color, so that we can see why the row is left_only or right_only

Hemantkumar-gslq
Автор

Is there a way to compare only a specific column?
For example I need to compare only column A from both the sheets

bucket_farmer
Автор

I have the source file and target file. so in that, I have to compare 140 columns and show the result if it matches or not. for example, there is a column as Country1 in source and in target as Country2. to compare that i will use True else return false. to compare 140+ columns it will take time to compare 140 columns. so how can I solve this?

vinayakchikkorde
Автор

Very glad to learn from you thru this video this helped me in my work (Method-2 is cool). Many thanks.

javo
Автор

good demonstration and able to follow through, thanks

vithoughts
Автор

Great demonstration!, I have been wondering if there is a possibility to compare 2 csv files, but when e.g Value in Cell "A2" in CSV1 appears in Cell "A20" in CSV2. So there is no exact match, it has to find the value from CSV1 somewhere in CSV2 and compare it then.

Have you got an idea how to do it?

piotrkrajniak
Автор

for me its not working actually, itq not showing true or false, just showing what is in the dataset, but i have different value, its not showing

reinekeerthi
Автор

for each row in, find a matching row from

akshaybhat
Автор

How do we know the exact column name which has the different values ? Now the entire row is fetched .. but how do we know due to which value in a row, the entire row of data is mismatched?

rupalisingh
Автор

Good job, the only problem for me was the read_csv(). I had to use read_csv('your_file', encoder: 'utf-16').

rileynobles
Автор

Can you please find the percentage of discrepancy/mismatch between the two databases? for example, I can say 30% of the data1(csv1) is different than data2(csv2). Is it possible to do that?

findthetruth
Автор

Hi Thanks for the Video!,
how to control both and left and write only right as result?
result= df1.merge(df3, indicator=True, how='outer').loc[lambda v:v ['_merge'] !='both' and !='left_only'] ! ?

anouartouil
Автор

I need to read the DB and import to CSV file and need to compare the Imported two files and the report should be like Sheet 1 should hold the mismatched values with highlighting red colour for the values mismatched and sheet 2 and sheet 3 should be the imported file used to compare

sampathkumar