Created by: dannguyen
(I submitted this pull request previously, but had a personal accident with git push --force
that resulted in wiping out that request)
As of 1.0.6 official, csvformat --no-header-row
had no effect, e.g.
$ csvformat -H examples/dummy.csv
a,b,c
1,2,3
The expected result is:
$ csvformat -H examples/dummy.csv
a,b,c
a,b,c
1,2,3
I made a small fix to the if self.args.no_header_row:
conditional branch in csvformat.py: https://github.com/dannguyen/csvkit/commit/c4afb6cfb722eac0d7f6d806dc8af85a48251204#diff-2cc13332fa912f35edb0048f998a890bebba81bcbfdb11a020e82f76555098a7R53
The corresponding test in test_csvformat.py did not have the correct expected results, so I made the necessary quick fix there too: