Closed shenwei356 closed 3 months ago
Related to this, or a more general case, would be a global flag --skip-lines N
to skip the first N input lines before processing.
My specific use case is csvtk xlsx2csv
where the input file contains a few irrelevant first rows. csvkit's in2csv
has such a flag (but doesn't let you specify the output delimiter, unlike csvtk, thanks!).
It's relatively easier to implement this now with the current API. But I'm on vacation now. Let me add it to the TODO list.
@cbrueffer what kind of lines do you want to skip?
Do they have the same column number as the left rows?
csvtk fix | csvtk xxx --skip-rows xx
Do they begin with some special character like #
?
-C, --comment-char
with it.https://github.com/shenwei356/csvtk/issues/258#issuecomment-1995997824
- add a new global flag
-U, --delete-header
for disable outputing the header row. Supported commands: concat, csv2tab/tab2csv, csv2xlsx/xlsx2csv, cut, filter, filter2, freq, fold/unfold, gather, fmtdate, grep, head, join, mutate, mutate2, replace, round, sample.
https://github.com/shenwei356/csvtk/issues/258#issuecomment-1882300347