4 ms·
It's worth noting that a lot of these tricks will break on non-trivial CSV inputs, e.g. ones that contain escaped commas. I like using the shell (and Awk in pa
by woodruffw 3y ago
It's worth noting that a lot of these tricks will break on non-trivial CSV inputs, e.g. ones that contain escaped commas.
I like using the shell (and Awk in particular!) as much as anyone, but for CSV I tend to reach for Python's standard csv module[1].
[1]: https://docs.python.org/3/library/csv.html https://docs.python.org/3/library/csv.html
- renewiltord 3y agoA thing Python's csv module enables that many others don't is ragged CSVs (column numbers not all same).