Skip to content

heloisethero/memo-xsv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 

Repository files navigation

memo-xsv

https://github.com/BurntSushi/xsv

Basic tricks

xsv table truc.csv

xsv headers truc.csv

xsv count truc.csv

xsv stats truc.csv | xsv table

xsv slice truc.csv -s 3173948 | xsv table

xsv sample 10 truc.csv | xsv table

To select only certain columns from a table

xsv select column1,column2 truc.csv > short_truc.csv

To sort a table based on a column

xsv sort -s column_name table_name.csv > sorted_table_name.csv

To count the number of values in a column

xsv frequency -s column table.csv --limit 5

To count the number of unique values in one column

xsv frequency -s my_column my_file.csv --limit 0 | xsv count

To count the number of unique values of each column

xsv stats my_file.csv --cardinality | xsv select field,cardinality

To remove the rows containing a certain value from a table

xsv search -s column value-to-suppress table.csv -v > filtred-table.csv

To concatenate two tables with similar columns by adding their rows

xsv cat rows table_1.csv table_2.csv > table_1+2.csv

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published