1CSVSTACK(1)                         csvkit                         CSVSTACK(1)
2
3
4

NAME

6       csvstack - csvstack Documentation
7

DESCRIPTION

9       Stack up the rows from multiple CSV files, optionally adding a grouping
10       value to each row:
11
12          usage: csvstack [-h] [-d DELIMITER] [-t] [-q QUOTECHAR] [-u {0,1,2,3}] [-b]
13                          [-p ESCAPECHAR] [-z FIELD_SIZE_LIMIT] [-e ENCODING] [-S] [-H]
14                          [-K SKIP_LINES] [-v] [-l] [--zero] [-V] [-g GROUPS]
15                          [-n GROUP_NAME] [--filenames]
16                          FILE [FILE ...]
17
18          Stack up the rows from multiple CSV files, optionally adding a grouping value.
19
20          positional arguments:
21            FILE                  The CSV file(s) to operate on. If omitted, will accept
22                                  input on STDIN.
23
24          optional arguments:
25            -h, --help            show this help message and exit
26            -g GROUPS, --groups GROUPS
27                                  A comma-separated list of values to add as "grouping
28                                  factors", one for each CSV being stacked. These will
29                                  be added to the stacked CSV as a new column. You may
30                                  specify a name for the grouping column using the -n
31                                  flag.
32            -n GROUP_NAME, --group-name GROUP_NAME
33                                  A name for the grouping column, e.g. "year". Only used
34                                  when also specifying -g.
35            --filenames           Use the filename of each input file as its grouping
36                                  value. When specified, -g will be ignored.
37
38       See also: ../common_arguments.
39

EXAMPLES

41       Contrived example: joining a set of  homogoenous  files  for  different
42       years:
43
44          csvstack -g 2009,2010 examples/realdata/FY09_EDU_Recipients_by_State.csv examples/realdata/Datagov_FY10_EDU_recp_by_State.csv
45

AUTHOR

47       Christopher Groskopf
48
50       2021, Christopher Groskopf
51
52
53
54
551.0.4                            Jan 27, 2021                      CSVSTACK(1)
Impressum