LinuxCommandLibrary

xsv

xsv

TLDR

Inspect the headers of a file

$ xsv headers [path/to/file.csv]
copy


Count the number of entries
$ xsv count [path/to/file.csv]
copy


Get an overview of the shape of entries
$ xsv stats [path/to/file.csv] | xsv table
copy


Select a few columns
$ xsv select [column_a,column_b] [path/to/file.csv]
copy


Show 10 random entries
$ xsv sample [10] [path/to/file.csv]
copy


Join a column from one file to another
$ xsv join --no-case [column_a] [path/to/file/a.csv] [column_b] [path/to/file/b.csv] | xsv table
copy

Help

Usage:
    xsv  [...] 
    xsv [options] 

Options:
    --list        List all commands available. 
    -h, --help    Display this message 
     -h  Display the command help message 
    --version     Print version info and exit 

Commands:
    cat         Concatenate by row or column 
    count       Count records 
    fixlengths  Makes all records have same length 
    flatten     Show one field per line 
    fmt         Format CSV output (change field delimiter) 
    frequency   Show frequency tables 
    headers     Show header names 
    help        Show this usage message. 
    index       Create CSV index for faster access 
    input       Read CSV data with special quoting rules 
    join        Join CSV files 
    sample      Randomly sample CSV data 
    search      Search CSV data with regexes 
    select      Select columns from CSV 
    slice       Slice records from CSV 
    sort        Sort CSV data 
    split       Split CSV data into many files 
    stats       Compute basic statistics 
    table       Align CSV data into columns 

Copied to clipboard