Skip to content

Merge multiple CSV files into one mega CSV. Simple, fast, offline. Handles huge files with smart header detection and batch processing.

License

Notifications You must be signed in to change notification settings

GhostArmyIntel/csv-merger

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š CSV Merger

License: MIT Python 3.x Platform PRs Welcome Made with ❀️

Merge multiple CSV files into one mega CSV. Simple, fast, offline.

Why This?

Manual Merging CSV Merger
❌ Tedious copy-paste βœ… One click
❌ Duplicate headers βœ… Smart header handling
❌ Error-prone βœ… Automatic validation
❌ Time-consuming βœ… Batch processing
❌ Scattered outputs βœ… Organized vault

Features

  • 🎯 Drag & Drop - Interactive interface (Windows)
  • Batch Processing - Merge 100+ files at once
  • Smart Headers - Automatically keeps one header, skips duplicates
  • Recursive Mode - Find CSVs in subfolders
  • Organized Output - Timestamped folders in merge_vault/
  • Cross-Platform - Windows, Linux, macOS
  • No Dependencies - Just Python 3.x standard library
  • No Size Limits - Handles huge files

Quick Start

Windows (Interactive Mode!)

# 1. Double-click to launch
CSV Merger.bat

# 2. Type or paste folder path - done!

Linux/Mac

chmod +x convert.sh
./convert.sh /path/to/csvs

Python (All Platforms)

# Merge entire folder
python3 csv_merger.py -d ./data -o merged.csv -v

# Merge specific files
python3 csv_merger.py file1.csv file2.csv file3.csv -o merged.csv -v

# Recursive merge (include subfolders)
python3 csv_merger.py -d ./data -o merged.csv --recursive -v

Output

All outputs saved to timestamped folders:

CSV-Merger/
└── merge_vault/
    β”œβ”€β”€ 20241107_093015/
    β”‚   └── MERGED_ALL.csv
    β”œβ”€β”€ 20241107_143022/
    β”‚   └── MERGED_ALL.csv
    └── 20241107_201545/
        └── MERGED_ALL.csv

Example

# Before: 50 CSV files scattered everywhere
# After: One clean CSV with all data combined

python3 csv_merger.py -d ~/data/csvs -o mega.csv -v
# Output: merge_vault/20241107_1430/MERGED_ALL.csv

How It Works

  1. Scans folder for .csv files
  2. Reads header from first CSV
  3. Writes that header to output file
  4. Iterates through all files, skipping their headers
  5. Appends all data rows to output
  6. Skips empty rows and handles errors gracefully

Use Cases

βœ… Combine monthly/weekly CSV reports βœ… Merge data exports from multiple sources βœ… Consolidate database dumps βœ… Aggregate Excel exports βœ… Combine WiGLE/Kismet wardriving data βœ… Merge sensor/IoT data logs βœ… Any CSV files!

Installation

No installation needed! Just requires Python 3.x:

Windows: Download Python Linux: sudo apt install python3 (Ubuntu/Debian) Mac: brew install python3

Documentation

  • START_HERE.txt - Quick start guide with ASCII art
  • HOW_TO_USE.txt - Visual guide for Windows
  • QUICKSTART.md - Platform-specific instructions
  • README.md - This file

Options

python3 csv_merger.py --help

Options:
  -d, --directory     Directory containing CSV files
  -o, --output        Output merged CSV file (required)
  -v, --verbose       Show detailed progress
  --recursive         Include CSVs in subfolders

Requirements

  • Python 3.6 or higher
  • No external dependencies (uses standard library only)

License

MIT - See LICENSE


Made with ❀️ by ringmast4r

About

Merge multiple CSV files into one mega CSV. Simple, fast, offline. Handles huge files with smart header detection and batch processing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 42.9%
  • Batchfile 32.1%
  • Shell 25.0%