Skip to content

Latest commit

 

History

History
18 lines (17 loc) · 1.38 KB

README.md

File metadata and controls

18 lines (17 loc) · 1.38 KB

compare_files

Compares two CSV files by the fields that you specify

  1. Two sample files have been included for you. Download all files into the same directory and run from the command line with "python compare_files.py config.json" (without quotes). You can also follow the directions below to create and run your own CSV files.
  2. Update the config.json file with two different CSV file names. To sample files have been included for you. Start the path with "." and include subdirectories if needed.
  3. If your file has a header, make hasHeader true; otherwise hasHeader should be false. One file can have a header while the other one doesn't, both files can have headers, or neither file can have headers.
  4. If you want to include the header in the output, make includeHeader true; otherwise, includeHeader should be false.
  5. For each file, enter the "columnsToCompare," and number the columns starting from zero. The column numbers in each file do not have to be the same, but the data types should be the same.
  6. For "columnsToSortBy" enter the sort columns, by numbering each number in "columnsToCompare" starting from zero. For example, if the "columnsToCompare" are [0,2,4], the "columnsToSortBy" will be [0,1,2].
  7. Lastly, specify the directory for the output files. Start the path with "." and include subdirectories if needed. To put your files in the working directory, specify "".