wireservice / csvkit

A suite of utilities for converting to and working with CSV, the king of tabular file formats.
https://csvkit.readthedocs.io
MIT License
6.03k stars 603 forks source link

Cannot `csvgrep` columns containing hyphens #1263

Closed vectro closed 3 months ago

vectro commented 3 months ago

If one attempts to use csvgrep --columns with columns whose names contain -, then we get the error message ColumnIdentifierError: Invalid range %s. Ranges must be two integers separated by a - or : character. This is true even if the columns names were quoted.

Tested using csvgrep 2.0.1.

jpmckinney commented 3 months ago

Basically the same issue as #468. You can use column indices in your case instead of names.