Skip to content

Instantly share code, notes, and snippets.

@nickcheng
Last active October 5, 2018 00:50
Show Gist options
  • Save nickcheng/0318cc7b4d2c5c7a9623e7d90a30dda6 to your computer and use it in GitHub Desktop.
Save nickcheng/0318cc7b4d2c5c7a9623e7d90a30dda6 to your computer and use it in GitHub Desktop.
[Combine CSV files by column name] #csv
# Need csvkit
# Ref: https://github.com/wireservice/csvkit/issues/245
csvjson --stream file_1.csv >> combined.jsonl
csvjson --stream file_2.csv >> combined.jsonl
in2csv --format ndjson combined.jsonl >> combined.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment