Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/carlosulisesochoa/csv-file-validator
This python script re-build csv files removing invalid rows
https://github.com/carlosulisesochoa/csv-file-validator
csv csv-validator python
Last synced: about 1 month ago
JSON representation
This python script re-build csv files removing invalid rows
- Host: GitHub
- URL: https://github.com/carlosulisesochoa/csv-file-validator
- Owner: CarlosUlisesOchoa
- Created: 2023-10-03T00:44:58.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-03T04:48:56.000Z (about 1 year ago)
- Last Synced: 2023-10-03T13:25:14.377Z (about 1 year ago)
- Topics: csv, csv-validator, python
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [Example](#example)
- [Contributing](#contributing)
- [Contact](#contact)## 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](https://www.python.org/).## Usage
Open a terminal and navigate to the directory containing the script. Then, run the following command:
```bash
python main.py
```## Example
Let's say you have a directory `input` with the following CSV files:
- `sample1.csv`
- `sample2.csv`
- ... more csv filesAfter running the command:
```bash
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](https://github.com/CarlosUlisesOchoa/csv-file-validator/issues) or submit a pull request.
## Contact
- Website [carlos8a.com](https://carlos8a.com)
- GitHub [@CarlosUlisesOchoa](https://github.com/carlosulisesochoa)
- X [@Carlos8aDev](https://twitter.com/carlos8adev)