csvstack
Vertical CSV file concatenator
TLDR
Stack multiple CSV files
SYNOPSIS
csvstack [options] files...
DESCRIPTION
csvstack concatenates multiple CSV files vertically (row-wise). Part of csvkit, it aligns columns by header name and can add a grouping column to track source files.
The tool handles files with different column orders by matching header names, making it robust for combining datasets from different sources.
PARAMETERS
-g names
Add grouping column with values.-n name
Name for grouping column.-H, --no-header-row
Inputs have no header row.--filenames
Use filenames as group values.-d char
Field delimiter.-q char
Quote character.-e encoding
Input encoding.
CAVEATS
All files should have matching columns for clean output. Missing columns filled with empty values. Part of csvkit, requires Python. Headers from first file used if different.
HISTORY
csvstack is part of csvkit, created by Christopher Groskopf in 2011. It simplifies combining multiple data files, a common task in data processing and analysis workflows.
