CSVKIT

Install csvkit (windows / Linux / mac)

pip install csvkit

To get a list of Column Names from CSV

csvcut -n sales_100.csv

Quick stats about the CSV file such as number of columns, sample values, does it contain NULL or not

csvstat sales_100.csv

View the CSV in Table format

csvlook sales_100.csv

csvlook --max-rows 2 sales_100.csv

csvlook -l --max-rows 20 sales_100.csv

To view selected columns, use csvcut.

csvcut -c 1,2,4 sales_100.csv

csvcut -c 1,2,4 sales_100.csv | csvlook

To see the result with Line Numbers, use param -l

csvcut -c 1,2,4 sales_100.csv | csvlook -l

Instead of column numbers, column names can also be used

csvcut -c Region,Country sales_100.csv | csvlook -l

Exclude selected columns

csvcut -C Region,Country sales_100.csv | csvlook

Change column delimiter

csvformat -D "|" sales_100.csv