Comparing Value Difference Between 2 CSV Files using pandas

Поділитися
Вставка
  • Опубліковано 3 лис 2024

КОМЕНТАРІ • 35

  • @saktibiswal6445
    @saktibiswal6445 2 роки тому

    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.

  • @alanarturovargasandrade5145
    @alanarturovargasandrade5145 2 роки тому +1

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

    • @jiejenn
      @jiejenn  2 роки тому

      Glad the video helped.

  • @torque6389
    @torque6389 3 роки тому

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

  • @Shawny1007
    @Shawny1007 3 роки тому

    Beautifully demonstrated!

  • @javo985
    @javo985 2 роки тому

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

  • @piotrkrajniak3514
    @piotrkrajniak3514 2 роки тому +2

    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?

    • @sandipanchowdhury1551
      @sandipanchowdhury1551 2 роки тому

      I would recommend convert that into a string then compare

    • @shailejagundu2017
      @shailejagundu2017 Рік тому

      Hi, where are you able to solve your issue? Because even I am looking for that solution. please let me know if you resolved that one.

  • @Hemantkumar-gs1lq
    @Hemantkumar-gs1lq 2 роки тому +1

    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

  • @vithoughts7229
    @vithoughts7229 3 роки тому

    good demonstration and able to follow through, thanks

    • @jiejenn
      @jiejenn  3 роки тому

      Glad the video helped.

  • @bucket_farmer
    @bucket_farmer Рік тому

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

  • @vinayakchikkorde8151
    @vinayakchikkorde8151 3 роки тому

    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 if(source['country1]==target['country2])return True else return false. to compare 140+ columns it will take time to compare 140 columns. so how can I solve this?

  • @talalsiddiqui8530
    @talalsiddiqui8530 3 роки тому

    Thanks mate.. It worked

    • @jiejenn
      @jiejenn  3 роки тому

      Glad the video helped.

  • @rupalisingh6116
    @rupalisingh6116 Рік тому

    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?

    • @jiejenn
      @jiejenn  Рік тому

      You change the axis from row to column.

  • @torque6389
    @torque6389 3 роки тому

    Great job

  • @findthetruth3021
    @findthetruth3021 2 роки тому

    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?

    • @jiejenn
      @jiejenn  2 роки тому

      Can't you just the row number different / total rows to get the % number?

    • @findthetruth3021
      @findthetruth3021 2 роки тому

      @@jiejennit is not one column, 10 columns with 1000 rows. How can I do that?

    • @gbhargavi8594
      @gbhargavi8594 2 роки тому

      @@findthetruth3021 hi halkawt. Did done with the comparision of this matching rows and difference of percentage.. if you cracked that please let me know?

  • @reinekeerthi9448
    @reinekeerthi9448 2 роки тому

    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

  • @rileynobles7146
    @rileynobles7146 2 роки тому

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

    • @jiejenn
      @jiejenn  2 роки тому

      Glad the video helped.

  • @sampathkumar7234
    @sampathkumar7234 3 роки тому

    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

    • @jiejenn
      @jiejenn  3 роки тому

      Huh? Please don't ask other people to do your work for you. I wish you luck.

    • @sampathkumar7234
      @sampathkumar7234 3 роки тому

      @@jiejenn I new to python platform, I need that to be prepared in short time that’s y. I am looking for someone help on it.

    • @Pravinamadoori
      @Pravinamadoori 3 роки тому

      Did you get to do it ?

    • @sampathkumar7234
      @sampathkumar7234 3 роки тому

      @@Pravinamadoori No PM

  • @akshaybhat9040
    @akshaybhat9040 2 роки тому

    for each row in , find a matching row from

  • @aravindhravi2307
    @aravindhravi2307 2 роки тому

    👏

  • @anouartouil3645
    @anouartouil3645 2 роки тому

    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'] ! ?