Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ csv Public

This repository contains python program to deal with CSV files.

Notifications You must be signed in to change notification settings

aljinnah/csv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

csv

This repository contains python program to deal with CSV files. Comparing csv files using compare_pandas_csv1_csv2.py required pandas installed in workstation.

pip install pandas

compare_pandas_csv1_csv2.py require four commandline argument to compare two csv files. Lets assume we have a target.csv file with information in column 0 which need to be compared with a result.csv file with information in column 2. Then the program should run in the approach outlined below:

compare_pandas_csv1_csv2.py target.csv 0 result.csv 2 #Note: we have to use (same) headers in both target and result CSV, otherwise there might be inconsistency output since pandas will treat first value in a column as column header.

Running this command will produce two output files.

missing_in_result_comparing_target.csv will contain information which is found in target.csv but not in result.csv in their respective columns.

matching_in_result_comparing_target.csv will contain information which is found both in target.csv and result.csv in their respective columns.

About

This repository contains python program to deal with CSV files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages