Compare Two Excel Sheets with Different Number of Rows and Find Differences using Python

preview_player
ะŸะพะบะฐะทะฐั‚ัŒ ะพะฟะธัะฐะฝะธะต

๐——๐—˜๐—ฆ๐—–๐—ฅ๐—œ๐—ฃ๐—ง๐—œ๐—ข๐—ก
โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€
In this video, I will show you how to use Python to compare two Excel sheets with different numbers of rows and find the differences between them.

๐ŸŒ ๐—Ÿ๐—œ๐—ก๐—ž๐—ฆ:

โญ ๐—ง๐—œ๐— ๐—˜๐—ฆ๐—ง๐—”๐— ๐—ฃ๐—ฆ:
00:00 โ€“ Introduction
00:25 โ€“ Install & load dependencies
01:07 โ€“ Data with the same shape using pandas
04:31 โ€“ Data with the same shape using xlwings
06:32 โ€“ Data with different shape using pandas
09:28 โ€“ Highlight the difference using xlwings
10:13 โ€“ Outro

๐—ง๐—ข๐—ข๐—Ÿ๐—ฆ ๐—”๐—ก๐—— ๐—ฅ๐—˜๐—ฆ๐—ข๐—จ๐—ฅ๐—–๐—˜๐—ฆ
โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€

๐—–๐—ข๐—ก๐—ก๐—˜๐—–๐—ง ๐—ช๐—œ๐—ง๐—› ๐— ๐—˜
โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€

โ˜• ๐—•๐˜‚๐˜† ๐—บ๐—ฒ ๐—ฎ ๐—ฐ๐—ผ๐—ณ๐—ณ๐—ฒ๐—ฒ?
If you want to support this channel, you can buy me a coffee here:
ะ ะตะบะพะผะตะฝะดะฐั†ะธะธ ะฟะพ ั‚ะตะผะต
ะšะพะผะผะตะฝั‚ะฐั€ะธะธ
ะะฒั‚ะพั€

this has plenty of day-to-day uses, thanks!

xilllllix
ะะฒั‚ะพั€

Fabulous video! Excellent explanation and perfect solutioning..

ghoshasish
ะะฒั‚ะพั€

exactly what I was looking for. good job and thank you

ankitait
ะะฒั‚ะพั€

Thank you very much for these incredible tutorials.

KhalilYasser
ะะฒั‚ะพั€

Thank you, i was looking for something like this

DeepakKumar-cxtr
ะะฒั‚ะพั€

Great content. Thanks for the code. !!

SanS-oohy
ะะฒั‚ะพั€

Hi!

Thank you for this great video! It has helped me out a lot!
I just had one question though, I used the code from the second part of the video however when i execute my code, the rows on my worksheet don't get colors.

CODUlTiMaTeBaWsS
ะะฒั‚ะพั€

awsome in all ways : big thanks and big kudos for your clear & clever explanations !

VoltaireParis
ะะฒั‚ะพั€

Thank you! I run into this type of task pretty regularly. Excel doesn't have a built-in formula / tool for this, right? It would take a bunch of LOOKUPs and stuff?

bc
ะะฒั‚ะพั€

Hey, this is a great video, my task was majorly done, but xlwings does not run when we use the highlight code for very large datasets.
Moreover if you could provide a video where we can compare files having different number of columns it would be very helpful.

yogeetjain
ะะฒั‚ะพั€

if there is only column difference can you highlight with different color and if the entire row is not present in any of the file can you highlight with different color? This will give you an idea if there is only one column that is different or the entire row is not present in any of the file

sagarkadam
ะะฒั‚ะพั€

Hi, I have a questionโ€ฆ in the data with different shapes sections, what if the difference in the shape of the excel file was that additional columns were added or both columns and rows changed, how would you handle that?

kingofthesummer
ะะฒั‚ะพั€

thanks for the video. If you could also make a video on how to compare two JSON files with different actions and find differences using Python. Thank you

tseringdolmagangsudora
ะะฒั‚ะพั€

If I have a template workbook with 20+ shape-protected sheets, can I still use your code to find the diff between two ver? Or, what else should I do?

wbdxpmb
ะะฒั‚ะพั€

thanks for the video & explanation, if possible can you pls share the gitrepo or sample utility to test locally ???

sureshakkavarapu
ะะฒั‚ะพั€

for each row in source1.csv, find all matching values from source2, csv how its done please help me to solve this. thank you

akshaybhat
ะะฒั‚ะพั€

After getting the data, which exists in right_only sheet, (8:41) I am getting all the index as NaN and I am not able to convert that to python list. It still remains NaN. How can I proceed?

mohithasharma
ะะฒั‚ะพั€

Hello, what is your take on comparing XLSXs that have cells with multiline string values (ie, 7 lines of text). Pandas seems to be strangling with those.

alexk
ะะฒั‚ะพั€

Hey awesome video. You have put a lot of effort here. Thanks for that. Just a query how to compare 2 Excel with some common and some different columns details

freakfun
ะะฒั‚ะพั€

in my code, i want to compare two elements if they are in the same column, how could i achieve that? thank you

sahraouikhaoula