2018-10-22 21:51:33 +01:00
|
|
|
# xsv
|
|
|
|
|
2021-05-20 21:13:41 +01:00
|
|
|
> A CSV command-line toolkit written in Rust.
|
2019-06-03 01:06:36 +01:00
|
|
|
> More information: <https://github.com/BurntSushi/xsv>.
|
2018-10-22 21:51:33 +01:00
|
|
|
|
|
|
|
- Inspect the headers of a file:
|
|
|
|
|
|
|
|
`xsv headers {{path/to/file.csv}}`
|
|
|
|
|
|
|
|
- Count the number of entries:
|
|
|
|
|
|
|
|
`xsv count {{path/to/file.csv}}`
|
|
|
|
|
|
|
|
- Get an overview of the shape of entries:
|
|
|
|
|
|
|
|
`xsv stats {{path/to/file.csv}} | xsv table`
|
|
|
|
|
|
|
|
- Select a few columns:
|
|
|
|
|
2024-01-31 03:55:19 +00:00
|
|
|
`xsv select {{column1,column2}} {{path/to/file.csv}}`
|
2018-10-22 21:51:33 +01:00
|
|
|
|
|
|
|
- Show 10 random entries:
|
|
|
|
|
|
|
|
`xsv sample {{10}} {{path/to/file.csv}}`
|
|
|
|
|
|
|
|
- Join a column from one file to another:
|
|
|
|
|
2024-01-31 03:55:19 +00:00
|
|
|
`xsv join --no-case {{column1}} {{path/to/file1.csv}} {{column2}} {{path/to/file2.csv}} | xsv table`
|