Download
csvtk is implemented in the Go programming language.
Executable binary files for most popular operating systems are freely available
on the release page.
Current Version
- csvtk v0.39.0
csvtk:- improve performance.
- prevent overwriting input and auxiliary files.
- report file I/O and compression errors, even with
-I/--ignore-illegal-row. - fix column range selection.
- prevent integer overflow when expanding column ranges.
- avoid repeating duplicate-named columns during exclusions and fuzzy selection.
- accept literal column names containing regular-expression characters.
- make
--immediate-outputa global flag and flush both CSV and file output buffers. - preserve explicit stdin input when using
-X/--infile-list. - infer column counts from retained records when skipping empty or illegal rows, and skip empty rows with differing widths under
-E.
csvtk add-header:- reject mismatched column counts in subsequent input files.
csvtk cat:- preserve final lines without a newline and fix progress reporting and parameter validation.
csvtk comb:- fix reading of multiline fields, long records, comments, and many input files.
- reduce memory usage when generating combinations.
csvtk comma:- preserve numeric precision and scientific notation.
csvtk concat:- report ambiguous column names.
csvtk corr:- reject multiple input files instead of silently ignoring extra files.
csvtk csv2json:- fix JSON escaping, numeric formatting, and trailing commas with
-K/--skip-key. - require exactly one resolved key column.
- fix JSON escaping, numeric formatting, and trailing commas with
csvtk csv2md:- escape literal pipes and render cell line breaks without breaking the table.
csvtk csv2rst:- preserve multiline cells and align borders with Unicode padding.
csvtk csv2xlsx:- fix data loss in wide tables.
- generate distinct, valid sheet names for input files with conflicting names.
csvtk cut:- fix a panic when combining
-H,-m, and excluded columns.
- fix a panic when combining
csvtk filter:- fix
--anywhen selected fields contain non-numeric values.
- fix
csvtk filter2/mutate2/mutate3:- fix numeric precision and string handling, and allow mixing
$xand${x}references.
- fix numeric precision and string handling, and allow mixing
csvtk fix:- honor
--nawhen padding rows with-n/--buf-rows.
- honor
csvtk fix-quotes:- preserve valid escaped quotes and support regular-expression characters as delimiters.
csvtk fix-quotes/space2tab:- reject invalid and overflowing buffer sizes before opening output files.
csvtk fold:- honor
--ignore-case, retaining the first spelling of each key.
- honor
csvtk head/ncol/headers/space2tab/dim:- fix failures when processing many input files (with
--colsfordim).
- fix failures when processing many input files (with
csvtk inter:- fix intersections with empty inputs.
csvtk join:- fix joins with header-only inputs.
- fix misplaced keys and missing values in outer joins with reordered key fields.
- retain generated column names after an empty intermediate join and reject repeated key columns.
csvtk long2matrix/matrix2long:- validate value bounds and treat NaN as non-numeric when filtering.
csvtk mutate:- fix column insertion with
--removeand validate capturing groups.
- fix column insertion with
csvtk plot:- reject invalid field selections, non-finite dimensions, and invalid axis limits.
- accept uppercase output format names.
csvtk plot bar:- fix grouped bar alignment and reject duplicate categories within a group.
- honor X-axis limits and report unsupported logarithmic scales.
csvtk plot box/line:- pad large constant values without losing precision.
csvtk plot box/line/hist:- validate logarithmic domains and handle constant positive ranges before opening output files.
- reject non-finite axis ranges before rendering.
csvtk plot hist:- fix the
MEANlabel with--percentiles. - support logarithmic counts with empty bins, reject non-finite values, and report empty samples before computing percentiles.
- reject unrepresentable bin widths and ranges before rendering.
- fix the
csvtk plot line:- fix categorical axis ticks for single categories and custom axis limits.
csvtk pretty:- fix named alignment with row numbers and reject out-of-range alignment fields.
- validate alignment range bounds before expanding them.
csvtk replace:- fix group ranges and fuzzy selectors modifying unintended columns.
csvtk replace/fold/spread:- resolve field exclusions independently for each selector.
csvtk replace/rename2:- preserve literal dollar signs in key-value replacements.
csvtk round:- fix rounding of integers, decimals, and scientific notation.
csvtk sample:- reject NaN sampling proportions.
csvtk sep:- honor case-insensitive literal separators and keep output names and widths consistent when a named field overrides
-H.
- honor case-insensitive literal separators and keep output names and widths consistent when a named field overrides
csvtk sep/mutate/watch:- require exactly one selected field, including after range and exclusion expansion.
csvtk sort:- fix default sorting of single-column input and open ranges selecting only the last column.
- correctly sort by numeric-looking column names and negative open ranges.
csvtk split:- reject unsafe output directories before deleting files, even with
--force. - honor
--buf-rows 1and fix appending output when reading from stdin. - limit open files and memory when splitting by chunk count.
- reject unsafe output directories before deleting files, even with
csvtk split/csv2xlsx/splitxlsx:- reject generated output filenames that overwrite input files.
csvtk splitxlsx:- fix panics on short or blank rows.
- fix open field ranges and fuzzy field matching.
- honor
-o/--out-filewhen listing sheets and keep the workbook open until processing finishes.
csvtk summary:- fix field ranges with the default count operation and honor
--rand-seed. - resolve data and group selectors independently, including exclusions, and reject overlapping columns.
- reject overflowing field numbers.
- avoid overflow when computing medians and quartiles of finite values.
- fix field ranges with the default count operation and honor
csvtk summary/spread/sep/rename/rename2/csv2rst/corr/watch/pretty/fix/del-quotes/split/splitxlsx/space2tab/fix-quotes/transpose:- honor
-U/--delete-header.
- honor
csvtk watch:- prevent image output from overwriting inputs or tabular output.
- reject invalid report frequencies and handle inputs without finite numeric values.
- preserve non-numeric and non-finite records with
--pass.
csvtk xlsx2csv:- honor
-o/--out-filewhen listing sheets.
- honor
Links
| OS | Arch | File | Download Count |
|---|---|---|---|
| Linux | 64-bit | csvtk_linux_amd64.tar.gz | |
| Linux | arm64 | csvtk_linux_arm64.tar.gz | |
| macOS | 64-bit | csvtk_darwin_amd64.tar.gz | |
| macOS | arm64 | csvtk_darwin_arm64.tar.gz | |
| Windows | 64-bit | csvtk_windows_amd64.exe.tar.gz | |
| Windows | arm64 | csvtk_windows_arm64.exe.tar.gz | |
| FreeBSD | 64-bit | csvtk_freebsd_amd64.exe.tar.gz | |
| FreeBSD | arm64 | csvtk_freebsd_arm64.exe.tar.gz | |
| OpenBSD | 64-bit | csvtk_openbsd_amd64.exe.tar.gz | |
| OpenBSD | arm64 | csvtk_openbsd_arm64.exe.tar.gz |
Notes
- run
csvtk versionto check for updates. - run
csvtk genautocompleteto update Bash completion.
Installation
csvtk is implemented in the Go programming language.
Executable binary files for most popular operating systems are freely available
on the release page.
Method 1: Download binaries (latest stable/dev version)
Download the compressed
executable file for your operating system,
and decompress it with tar -zxvf *.tar.gz or another tool.
Then:
-
For Linux-like systems
-
If you have root privileges, simply copy it to
/usr/local/bin:sudo cp csvtk /usr/local/bin/ -
Or copy it to a directory listed in the environment variable
PATH:mkdir -p $HOME/bin/; cp csvtk $HOME/bin/
-
-
For Windows, just copy
csvtk.exetoC:\WINDOWS\system32.
Method 2: Install via conda or pixi (latest stable version) 
# >= v0.31.0
conda install -c conda-forge csvtk
# <= v0.31.0
conda install -c bioconda csvtk
# pixi
pixi global install csvtk
Method 3: Install via Homebrew
brew install csvtk
Method 4: For ArchLinux AUR users (may not be the latest)
yaourt -S csvtk
Method 5: Compiling from source (latest stable/dev version)
# ------------------- install golang -----------------
# download Go from https://go.dev/dl
wget https://go.dev/dl/go1.27.3.linux-amd64.tar.gz
tar -zxf go1.27.3.linux-amd64.tar.gz -C $HOME/
# or
# echo "export PATH=$PATH:$HOME/go/bin" >> ~/.bashrc
# source ~/.bashrc
export PATH=$PATH:$HOME/go/bin
# ------------------- compile csvtk ------------------
git clone https://github.com/shenwei356/csvtk
cd csvtk/csvtk/
# optionally choose a release
# git check v0.34.0
go build -trimpath -ldflags="-s -w" -tags netgo
# The executable binary file is located in:
# ./csvtk
# You can also move it to anywhere in the $PATH
mkdir -p $HOME/bin
cp ./csvtk $HOME/bin/
Shell-completion
Bash:
# generate completion shell
csvtk genautocomplete --shell bash
# configure if never did.
# install bash-completion if the "complete" command is not found.
echo "for bcfile in ~/.bash_completion.d/* ; do source \$bcfile; done" >> ~/.bash_completion
echo "source ~/.bash_completion" >> ~/.bashrc
Zsh:
# generate completion shell
csvtk genautocomplete --shell zsh --file ~/.zfunc/_csvtk
# configure if never did
echo 'fpath=( ~/.zfunc "${fpath[@]}" )' >> ~/.zshrc
echo "autoload -U compinit; compinit" >> ~/.zshrc
fish:
csvtk genautocomplete --shell fish --file ~/.config/fish/completions/csvtk.fish
Release history
- csvtk v0.38.0
csvtk:- correct help text, documentation examples, and spelling.
- added a new flag
--quote-allto quote all output fields, even when not necessary. #297
- new commands:
csvtk filter/filter2/mutate2/mutate3/sort/summary/round:- fix incorrectly converting
.to the number zero. #359
- fix incorrectly converting
csvtk cut:- support
-Z/--show-row-number. #360 - if there's only one input file, it will be output directly.
- support
csvtk corr:- write correlations to stdout or
-oby default; with--pass, keep forwarding input to output and writing correlations to stderr. #370
- write correlations to stdout or
csvtk sort:- support sorting by Unicode text length with
-k field:land reverse order with-k field:lr. #357
- support sorting by Unicode text length with
csvtk concat:- add
--original-fileto append each row's input filename. #369
- add
csvtk unfold:- support unfolding multiple fields in parallel. #363
csvtk fold:csvtk mutate2:- fix the function
lenfor Unicode strings. #368
- fix the function
csvtk join/freq/inter/uniq/summary/fold/spread/replace:- fix rare collisions between multi-column keys, when a field contains
_shenwei356_.
- fix rare collisions between multi-column keys, when a field contains
csvtk join:- fix
-nfor empty fields in multi-column keys and retain unmatched rows in left and outer joins. - retain columns from header-only input files in outer joins. #266
- fix
csvtk uniq:- add
-d/--repeatedto print one record per repeated key and-u/--uniqueto print records whose keys occur exactly once. #133 - use
--delimiterinstead of-dto set the input delimiter for this command.
- add
csvtk freq:- make
-iignore case.
- make
csvtk summary:- add
-n/--namesto rename summary columns. #273 - preserve input row positions for
argminandargmaxwhen used with quantiles.
- add
csvtk split:- add
-n/--nlinesto split input into chunks containing up to N records, and-c/--nchunksto distribute records among N chunks in a round-robin manner. An input header row is repeated in every chunk. #122 - encode key values in output filenames to prevent collisions and invalid paths.
- add
csvtk splitxlsx:- generate distinct, valid sheet names for keys that produce the same name.
- csvtk v0.37.0
csvtk:- add support for reading and writing the LZ4 compression format. #353
csvtk cut:- allow setting
-f/--fieldsmultiple times, useful for selecting a long column list.
- allow setting
csvtk csv2jon:csvtk pretty:- add a new style
regular. - adjust styles
3lineandround.
- add a new style
- csvtk v0.36.0
- new command
csvtk shuf: shuffle rows. #151 csvtk plot line/hist/bar/box- forgot to scale the font size of legend keys.
csvtk pretty- fix formatting Unicode text.
- new command
- csvtk v0.35.0
- csvtk v0.34.0
- new command
csvtk plot bar. Contributed by @lovromazgon #323 csvtk:- fix panic when the first field is empty, e.g.,
-f ,2,3.
- fix panic when the first field is empty, e.g.,
csvtk cut:csvtk plot box:- fix
--horiznot swapping axis labels. #314
- fix
csvtk plot line:- add a new flag
--data-field-x-nominalto plot lines with sortable nominal X axis values, such as dates. #308 by @lovromazgon
- add a new flag
csvtk plot:- add two new flags
--hide-x-labsand--hide-y-labs, for hiding the X/Y axes, ticks, and tick labels. #326
- add two new flags
csvtk fix:- add a new flag
--nato set content to fill. #316
- add a new flag
csvtk replace:- add new replacement symbols/placeholders for group-specific numbering:
{gnr},{enr},{rnr}. #322
- add new replacement symbols/placeholders for group-specific numbering:
csvtk sort:- add support for sorting by date/time. #278
- new command
- csvtk v0.33.0
- new command
csvtk comma: make numbers more readable by adding commas. #300 csvtk:- add a global flag
-V/--version. #304
- add a global flag
csvtk plot box/hist/line:- adds
--x-scale-lnand--y-scale-lnfor natural log scaling of the X & Y axes. #302 by @xxxserxxx
- adds
csvtk fold:- allow folding fields with no separator. #299 by @fgvieira
csvtk summary:- numbers in scientific notation are output as is.
- new command
- csvtk v0.32.0
csvtk filter2/mutate2/mutate3:- fix a mismatch between column names and values introduced in v0.31.1. #295
- add some unit tests.
csvtk pretty:-w/--min-widthand-W/--max-widthaccept multiple values for setting column-specific thresholds.- add a new format style
roundfor rounded corners.
- csvtk v0.31.1
- csvtk v0.31.0
- new command:
csvtk mutate3: create a new column from selected fields with Go-like expressions. Contributed by @moorereason 172
csvtk sort/join:- faster speed and lower memory use.
csvtk sort:- do not panic for empty input. #287
csvtk summary:- fix the order of columns. #282
csvtk rename2:- fix
-n/--start-num. #286 - add flag
--nr-width.
- fix
csvtk replace:- fix the implementation of
{nr}. #286
- fix the implementation of
csvtk csv2json:- fix values with double quotes and newline characters. #291
csvtk split:- support customizing the output file prefix and subdirectory using key prefixes. #288
csvtk spread:- add a new alias "scatter" to "spread". #265
csvtk grep:- do not show progress.
csvtk fix-quotes:- new flag
-b, --buffer-size.
- new flag
csvtk plot:- new flag
--scalefor scaling the image width/height, tick, axes, line/point and font sizes proportionally, suggested by @tseemann.
- new flag
csvtk plot line:csvtk hist:- new flags:
--line-width.
- new flags:
csvtk box:- plots of different groups have different colors now.
- new flags:
--line-width,--point-size, andcolor-index.
- new command:
- csvtk v0.30.0
csvtk:- group subcommands in the help message.
- add a new global flag
--quiet. #261 - add a new global flag
-U, --delete-headerto disable output of the header row. Supported commands: concat, csv2tab/tab2csv, csv2xlsx/xlsx2csv, cut, filter, filter2, freq, fold/unfold, gather, fmtdate, grep, head, join, mutate, mutate2, replace, round, sample. #258 - support more commands with
-Z/--show-row-number: head.
csvtk dim:- fix duplicated rows for multiple input files; this bug was introduced in v0.27.0.
csvtk concat:- fix panic when no data is found. #259
csvtk spread:- fix flag checking of
-kand-v.
- fix flag checking of
csvtk sort:- fix ordering when given multiple custom levels.
csvtk filter/filter2:- fix printing row number with
-Z.
- fix printing row number with
csvtk xls2csv:- output raw data. #262
csvtk pretty:- change the default value of
-n/--buf-rowsfrom 128 to 1024; use 0 to load all data.
- change the default value of
csvtk join:- new flag
-s/--suffixfor adding suffixes to colnames from each file. #263
- new flag
- csvtk v0.29.0
- new commands:
fix-quotes: fix malformed CSV/TSV caused by double-quotes. #260del-quotes: remove extra double-quotes added byfix-quotes.
csvtk del-header:- fix deleting headers of 2nd and later files. #257
csvtk concat:- fix panic when no data is found.
csvtk sort:- support column names containing colons. #254
csvtk filter2:csvtk plot:- add a new flag
--tick-label-size.
- add a new flag
csvtk pretty:- fix showing cell data containing "tabs", by replacing tabs with spaces.
- csvtk v0.28.0
csvtk:- add the shortcut
-Xfor the flag--infile-list. #249
- add the shortcut
csvtk pretty:- support field ranges for
-m/--align-centerand-r/--align-right. #244
- support field ranges for
csvtk spread:- support values sharing the same keys. #248
csvtk join:- a new flag
-P/--prefix-duplicates: add filenames as colname prefixes only for duplicated colnames. #246
- a new flag
csvtk mutate2:- fix changing the order of the header row; the code was accidentally omitted during code refactoring in v0.27.0. #252
csvtk xlsx2csv:- fix
open /tmp/excelize-: no such file or directoryerror for big.xlsxfiles. #251
- fix
csvtk comb:- fix the empty result bug for alphabet sizes greater than 64.
- csvtk v0.27.2
csvtk pretty:- fix the bug of an empty first row with
-H/--no-header-row, introduced in v0.27.0. - new style
3linefor a three-line table.
- fix the bug of an empty first row with
csvtk csv2xlsx:- binaries compiled with go1.21 would result in a broken xlsx file. #243
csvtk splitxlsx:- fix the error of
invalid worksheet index. #1617
- fix the error of
- csvtk v0.27.1
csvtk filter2/mutate2:- fix the bug of selecting with field numbers, introduced in v0.27.0. #242
- csvtk v0.27.0
csvtk:- code refactoring and simplifying code, with 16% less code.
- most commands support open column range syntax, e.g.,
csvtk grep -f 2-. #120 - only selected column names are not allowed to be duplicated in the input data: box, corr, filter, filter2, fold, freq, gather, historysort, inter, join, line, mutate, mutate2, rename, replace, sep, split, summary, unfold, uniq, watch. Other commands do not have the restriction. #235
- add a new global flag
-Z/--show-row-number, supported commands: cut, csv2tab, csv2xlsx, tab2csv, pretty. - the column name for the row number changes from "n" to "row": csv2xlsx, csv2tab, cut, filter, filter2, grep, pretty, sample, tab2csv.
- new command:
csvtk mutate/mutate2:- new flags
--at,--before,--afterfor specifying the position of the new column. #193
- new flags
csvtk cut:- fix unselect range error. #234
- fix
-i/--ignore-case.
csvtk pretty:- allow align-center and align-right for specific columns. #240
csvtk round:- fix bug of failing to round scientific notation with a value smaller than one, e.g.,
7.1E-1.
- fix bug of failing to round scientific notation with a value smaller than one, e.g.,
csvtk summary:- fix duplicated columns.
- fix result error when multiple stats are applied to the same column.
csvtk corr/watch:- rewrite and fix bug, support choosing fields with column names.
- csvtk v0.26.0
csvtk:- new command
csvtk fix: fix CSV/TSV with different numbers of columns in rows. #226 csvtk pretty: rewrite to support wrapping cells. #206 #209 #228csvtk cut/fmtdate/freq/grep/rename/rename2/replace/round: allow duplicated column names.csvtk csv2xlsx: optionally store numbers as floats. #217csvtk xlsx2csv: fix bug wherexlsx2csvtreats small numbers (padj < 1e-25) as 0. It's solved by updating the excelize package. #261csvtk join: a new flag for adding a filename as a column name prefix. by @tetedange13 #202csvtk mutate2: fix wrongly treating strings likeE10as numbers in scientific notation. #219csvtk sep: fix the logic. #218csvtk space2tab: fix "bufio.Scanner: token too long". #231- csvtk v0.25.0
csvtk: report empty files.csvtk join: fix loading file with no records.csvtk filter2/muate2:- support variable format of
${var}with special characters including commas, spaces, and parentheses, e.g.,${a,b},${a b}, or${a (b)}. #186
- support variable format of
csvtk sort: fix checking nonexistent fields.csvtk plot box/hist/line: new flag--skip-nafor skipping missing data. #188csvtk csv2xlsx: store numbers as floats. #192csvtk summary: new functionsargminandargmax. #181
- csvtk v0.24.0
- Incompatible changes:
csvtk mutate2/summary:mutate2: remove the option-L/--digits.- use the same option
-w/--decimal-widthto limit floats to N decimal points.
- new command
csvtk fmtdate: format date of selected fields. #159 csvtk grep: fix bug for searching with-r -p ..csvtk csv2rst: fix bug for data containing Unicode. #137csvtk filter2: fix bug for date expression. #146csvtk mutate2/filter2:csvtk cut: new flags-m/--allow-missing-coland-b/--blank-missing-col. #156csvtk pretty: still add header row for empty column.csvtk csv2md: better format.csvtk join: new flag-n/--ignore-null. #163
- Incompatible changes:
- csvtk v0.23.0
- new command:
csvtk csv2rstfor converting CSV to reStructuredText format. #137 csvtk pretty: add header separator line. #123csvtk mutate2/summary: fix message and doc. Thanks @VladimirAlexiev #127csvtk mutate2: fix null coalescence: ??. #129csvtk genautocomplete: supports bash|zsh|fish|powershell. #126csvtk cat: fix progress bar. #130csvtk grep: new flagimmediate-output.csvtk csv2xlsx: fix bug for table with > 26 columns. 138
- new command:
- csvtk v0.22.0
csvtk:- new command:
csvtk csv2xlsxfor converting CSV/TSV file(s) to a single.xlsxfile. - new command:
csvtk unfoldfor unfolding multiple values in cells of a field. #103 - rename
csvtk collapsetocsvtk fold, for folding multiple values of a field into cells of groups. csvtk cut: support range format2-to choose 2nd column to the end. #106csvtk round: fix bug of failing to round scientific notation with a value smaller than one, e.g.,7.1E-1.
- csvtk v0.21.0
- new command:
csvtk nrow/ncolfor printing number of rows or columns. - new command:
roundto round float to n decimal places. #112 csvtk headers: the file name and column index are optionally output with the new flag-v/--verbose.csvtk dim: new flags--tabluar,--cols,--rows,-n/--no-files.csvtk dim/ncol/nrow: can handle empty files now. #108csvtk csv2json#104:- new flag
-b/--blank: do not convert "", "na", "n/a", "none", "null", "." to null - new flag
-n/--parse-num: parse numeric values for nth column(s), multiple values are supported and "a"/"all" for all columns.
- new flag
csvtk xlsx2csv: fix output for ragged table. #110csvtk join: fix bug for joining >2 files.csvtk uniq: new flag-n/--keep-nfor keeping first N records of every key.csvtk cut: support repeatedly selecting columns. #106
- new command:
- csvtk v0.20.0
- new command
csvtk comb: compute combinations of items at every row. - new command
csvtk sep: separate column into multiple columns. #96 csvtk:- list line numbers of illegal (
-I) and empty (-E) rows. #97 - new flag
--infile-listfor providing a list of input files (one file per line); these are appended to files from CLI arguments
- list line numbers of illegal (
csvtk join:csvtk filter2: fix bug when column names start with digits, e.g.,1000g2015aug. Thank @VorontsovIE (#44)csvtk concat: allow one input file. #98csvtk mutate: new flag-R/--removefor removing input column.
- new command
- csvtk v0.19.1
csvtk:- fix checking file existence.
- show friendly error message when giving empty field like
csvtk cut -f a, b.
csvtk summary: fix err of q1 and q3. #90csvtk version: make checking for updates optional.
- csvtk v0.19.0
- new commands by @bsipos:
watch: online monitoring and histogram of selected field.corr: calculate Pearson correlation between numeric columns.cat: stream file and report progress.
csvtk split: fix bug of repeatedly outputting the header line when the number of output files exceeds the value of--buf-groups. #83csvtk plot hist: new option--percentilesto add percentiles to histogram x label. #88
- new commands by @bsipos:
- csvtk v0.18.2
csvtk replace/rename2/splitxlsx: fix flag conflicts with global flag-Isince v0.18.0.csvtk replace/rename2: removing shorthand flag-Ifor--key-capt-idx.csvtk splitxlsx: changing shorthand flag of--sheet-indexfrom-Ito-N.
- csvtk v0.18.1
- csvtk v0.18.0
csvtk: add new flag--ignore-illegal-rowto skip illegal rows. #72csvtk summary: add more textual/numeric operations. #64csvtk sort: fix bug for sorting by columns with empty values. #70csvtk grep: add new flag--delete-matchedto delete a pattern right after it is matched; this keeps the first matching data and speeds up searches when using regular expressions. #77
- csvtk v0.17.0
- new commands:
csvtk add-headerandcsvtk del-headerfor adding/deleting column names. #62
- new commands:
- csvtk v0.16.0
- new command:
csvtk csv2json: convert CSV to JSON format. - remove command:
csvtk stats2. - new command
csvtk summary: summary statistics of selected numeric fields (grouped by group fields), usage and examples. #59 csvtk replace: add flag--nr-width: minimum width for {nr} in flag -r/--replacement. e.g., formatting "1" to "001" by--nr-width 3(default 1)csvtk rename2/replace: add flag-A, --kv-file-all-left-columns-as-value, for treating all columns except the 1st as the value for a kv-file with more than 2 columns. #56
- new command:
- csvtk v0.15.0
- csvtk v0.14.0
csvtk: supporting multi-line fields by replacing multicorecsv with standard library encoding/csv, while losing support for metaline which was supported since v0.7.0. It also gains a little speedup.csvtk sample: add flag-n/--line-numberto print line number as the first column ("n")csvtk filter2: fix bug when column names start with digits, e.g.,1000g2015aug(#44)csvtk rename2: add support for similar replacement symbols{kv} and {nr}incsvtk replace
- csvtk v0.13.0
- new command
concatfor concatenating CSV/TSV files by rows #38 csvtk: add support for environment variables for frequently used global flags #39CSVTK_Tfor flag-t/--tabsCSVTK_Hfor flag-H/--no-header-row
mutate2: add support for eval expression WITHOUT column index symbol, so we can add some string constants #37pretty: better support for files with duplicated column names
- new command
- csvtk v0.12.0
- new command
collapse: collapsing one field with selected fields as keys freq: keeping original order of keys by defaultsplit:- performance improvement
- add option
-G/--out-gzipto force gzipped output
- new command
- csvtk v0.11.0
- add command
splitto split CSV/TSV into multiple files according to column values - add command
splitxlxsto split XLSX sheet into multiple sheets according to column values csvtk, automatically check BOM (byte-order mark) and discard it
- add command
- csvtk v0.10.0
- add subcommand
xlsx2csvto convert XLSX to CSV format grep,filter,filter2: add flag-n/--line-numberto print line-number as the first columncut: add flag-i/--ignore-caseto ignore case of column name
- add subcommand
- csvtk v0.9.1
csvtk replace: fix bug when replacing with key-value pairs brought in v0.8.0
- csvtk v0.9.0
- add subcommand
csvtk mutate2: create new column from selected fields by awk-like arithmetic/string expressions - add new command
genautocompleteto generate shell autocompletion script!
- add subcommand
- csvtk v0.8.0
- new command
csvtk gatherfor gathering columns into key-value pairs. csvtk sort: support sorting by user-defined order.- fix bug of unselecting field: wrongly reporting error of fields not existing.
affected commands:
cut,filter,fitler2,freq,grep,inter,mutate,rename,rename2,replace,stats2,uniq. - update help message of flag
-F/--fuzzy-fields. - update help message of global flag
-t, which overrides both-dand-D. If you want another delimiter for tabular input, use-t $'\t' -D "delimiter".
- new command
- csvtk v0.7.1
csvtk plot boxandcsvtk plot line: fix bugs for special cases of input- compile with go1.8.1
- csvtk v0.7.0
- fix bug of "stricter field checking" in v0.6.0 and v0.6.1 when using flag
-F/--fuzzy-fields csvtk prettyandcsvtk csv2md: add attention that these commands treat the first row as a header line and require column names to be unique.csvtk statrenamed tocsvtk stats, old name is still available as an alias.csvtk stat2renamed tocsvtk stats2, old name is still available as an alias.- issues/13 seamless support for data with a metadata line declaring the separator used by MS Excel.
- fix bug of "stricter field checking" in v0.6.0 and v0.6.1 when using flag
- csvtk v0.6.1
csvtk cut: minor bug: panic when no fields given. i.e.,csvtk cut. All relevant commands have been fixed.
- csvtk v0.6.0
csvtk grep: large performance improvement by discarding goroutine (multiple threads), and keeping output in order of input.- Better column name checking and stricter field checking,
fields out of range are not ignored now.
Affected commands include
cut,filter,freq,grep,inter,mutate,rename,rename2,replace,stat2, anduniq. - New command:
csvtk filter2, filtering rows by arithmetic/string expressions likeawk.
- csvtk v0.5.0
csvtk cut: delete flag-n/--names, move it to a new commandcsvtk headers- new command:
csvtk headers - new command:
csvtk head - new command:
csvtk sample
- csvtk v0.4.6
csvtk grep: fix result highlight when flag-vis on.
- csvtk v0.4.5
csvtk join: support the 2nd or later files with entries with same ID.
- csvtk v0.4.4
- add command
csvtk freq: frequencies of selected fields - add lots of examples in usage page
- add command
- csvtk v0.4.3
- improvement to the user experience: flag
-nis not required anymore when flag-His set incsvtk mutate
- improvement to the user experience: flag
- csvtk v0.4.2
- fix highlight bug of
csvtk grep: if the pattern matches multiple parts, the text will be wrongly edited. - changes: disable highlight when pattern file given.
- change the default output of all plotting commands to STDOUT; now you can pipe the image to the "display" command of ImageMagick.
- fix highlight bug of
- csvtk v0.4.1
- Nothing changed. Just fix the links due to inappropriate deployment of v0.4.0
- csvtk v0.4.0
- add flag for
csvtk replace:-K(--keep-key) keep the key as value when no value is found for the key. This was enabled by default in previous versions.
- add flag for
- csvtk v0.3.9
- fix bug: header row incomplete in
csvtk sortresult
- fix bug: header row incomplete in
- csvtk v0.3.8.1
- csvtk v0.3.8
- new feature:
csvtk cutsupports ordered fields output. e.g.,csvtk cut -f 2,1outputs the 2nd column in front of the 1st column. - new commands:
csvtk plotcan plot three types of plots by subcommands:csvtk plot hist: histogramcsvtk plot box: boxplotcsvtk plot line: line plot and scatter plot
- new feature:
- csvtk v0.3.7
- fix a serious bug of using negative field of column name, e.g.
-f "-id"
- fix a serious bug of using negative field of column name, e.g.
- csvtk v0.3.6
csvtk replacesupports replacement symbols{nr}(record number) and{kv}(corresponding value of the key ($1) by key-value file)
- csvtk v0.3.5.2
- add flag
--fillforcsvtk join, so we can fill the unmatched data - fix typo
- add flag
- csvtk v0.3.5.1
- fix minor bug of reading lines ending with
\r\nfrom a dependency package
- fix minor bug of reading lines ending with
- csvtk v0.3.5
- fix minor bug of
csv2md - add subcommand
versionwhich could check for updates
- fix minor bug of
- csvtk v0.3.4
- fix bug of
csvtk replacethat incorrectly edited the header row.
- fix bug of
- csvtk v0.3.3
- fix bug of
csvtk grep -t -P
- fix bug of
- csvtk v0.3.2
- fix bug of
inter
- fix bug of
- csvtk v0.3.1
- add support for searching multiple fields for
grep
- add support for searching multiple fields for
- csvtk v0.3
- add subcommand
csv2md
- add subcommand
- csvtk v0.2.9
- add more flags to subcommand
pretty - fix bug of
csvtk cut -n - add subcommand
filter
- add more flags to subcommand
- csvtk v0.2.8
- add subcommand
pretty-- convert CSV to readable aligned table
- add subcommand
- csvtk v0.2.7
- fix highlighting failures in Windows
- csvtk v0.2.6
- fix one error message of
grep - highlight matched fields in result of
grep
- fix one error message of
- csvtk v0.2.5
- fix bug of
statthat failed to handle files with a header row - add subcommand
stat2- summary of selected number fields - make the output of
statprettier
- fix bug of
- csvtk v0.2.4
- fix bug of handling comment lines
- add some notes before using csvtk
- csvtk v0.2.3
- add flag
--colnamestocut - flag
-f(--fields) ofjoinsupports single value now
- add flag
- csvtk v0.2.2
- add flag
--keep-unmathedtojoin
- add flag
- csvtk v0.2
- finish most functions
- csvtk v0.2.1
- fix bug of
mutate
- fix bug of