21
Nov
Replacement for unix ‘cut’ that works with CSV
A while ago I was working with a very large CSV file that had many columns but I only needed two columns of.
I normally would use the Unix command ‘cut’ to get the columns I want but this does not work well for CSV files that are escaped (that is the separator is escaped).
So here is a drop in replacement written in Python that works just like ‘cut’ but for almost all CSV files: