codeinthehole / csvfilter

Command-line tool for manipulating CSV data
http://codeinthehole.com/writing/csvfilter-a-python-command-line-tool-for-manipulating-csv-data/
MIT License
75 stars 15 forks source link

Python3 compatible version #15

Open ebouhdadi opened 3 years ago

ebouhdadi commented 3 years ago

Since Python2.7 is deprecated, I used pip3 to install csvfilter. I noticed that it outputs only the first ligne of my csv file:

csvfilter -f 1,3,5 test.csv ScanDate,DependencyPath,License

neoromantique commented 2 years ago

+1

rsasum commented 1 year ago

In "init.py" "Processor.init" the variable field must be converted into a list. So change the following line.

self.fields = fields to self.fields = list(fields)

Worked for me