csvcut -n data.csv

Category: Data Science & Analysis

csvcut -n data.csv

List column names and indices of a CSV

csvcut is part of csvkit, a Python suite of CSV utilities. The -n flag prints each column's 1-based index and name, the reference for every other csvcut invocation. It also reveals the delimiter of the input file. Use this before cutting columns so you address fields correctly.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.