Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/carlosulisesochoa/merge-multiple-csv
a python script to merge multiple csv files, merge and remove duplicates if exists
https://github.com/carlosulisesochoa/merge-multiple-csv
csv csv-merge csv-merger python
Last synced: about 9 hours ago
JSON representation
a python script to merge multiple csv files, merge and remove duplicates if exists
- Host: GitHub
- URL: https://github.com/carlosulisesochoa/merge-multiple-csv
- Owner: CarlosUlisesOchoa
- Created: 2023-09-27T02:33:55.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-03T04:50:08.000Z (about 1 year ago)
- Last Synced: 2023-10-04T14:03:56.207Z (about 1 year ago)
- Topics: csv, csv-merge, csv-merger, python
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
CSV Merger
---
## Overview
This Python script merges multiple CSV files by appending rows to a single output CSV file. The script also processes each row to reformat the date and filter the columns before merging.
## Table of Contents
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [Options](#options)
- [Example](#example)
- [Contributing](#contributing)
- [Contact](#contact)## Prerequisites
- Python 3.6 or later
## Installation
1. Clone this repository or download the script `csv_merger.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 csv_merger.py [OPTIONS]
```## Options
- `-n, --name [FILENAME]`: Specifies the name of the output file (default: `merged.csv`).
- `-d, --delete`: Deletes input files after merging (default: False).## Example
Let's say you have a directory `input` with the following CSV files:
- `file1.csv`
- `file2.csv`After running the command:
```bash
python csv_merger.py -n "final_version" -d
```An output file named `final_version.csv` will be created in the ouput directory, and the input files will be deleted if the `-d` flag is set.
## Contributing
For contributing to this project, please feel free to [open an issue](https://github.com/CarlosUlisesOchoa/merge-multiple-csv/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)