Skip to content

CarlosUlisesOchoa/csv-file-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CSV Validator


Overview

This Python script processes CSV files in a specified input directory and writes only the valid rows to a new CSV file in an output directory. The script also logs the processing time, the files being processed, and any invalid rows that are skipped.

Table of Contents

Prerequisites

  • Python 3.6 or later

Installation

  1. Clone this repository or download the script main.py.
  2. Make sure you have Python installed, or download it from Python's official website.

Usage

Open a terminal and navigate to the directory containing the script. Then, run the following command:

python main.py

Example

Let's say you have a directory input with the following CSV files:

  • sample1.csv
  • sample2.csv
  • ... more csv files

After running the command:

python main.py

New CSV files e. g. the new sample1.csv will contain only valid rows and will be located in the output directory. Also, a log file named log.txt will be updated with processing details.

Contributing

For contributing to this project, please feel free to open an issue or submit a pull request.

Contact

About

This python script re-build csv files removing invalid rows

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages