We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
csvtk version
csvtk del-header on one column removes the empty cells. example.txt
csvtk del-header
Empty cells are included:
cat example.txt | csvtk cut -f species
Empty cells are removed:
cat example.txt | csvtk cut -f species | csvtk del-header
The text was updated successfully, but these errors were encountered:
Hmm, they are treated as empty rows and skipped since v0.26.0.
This is problematic in your situation, I should make it optional with
-E, --ignore-empty-row ignore empty rows
Sorry, something went wrong.
That's sad, the official csv reader skip blank lines by default, and no option to disable this.
https://pkg.go.dev/encoding/csv
Blank lines are ignored. A line with only whitespace characters (excluding the ending newline character) is not considered a blank line.
Some guys tried to change this but failed., the PR was not accepted.
A workaround way: add the row number with the global flag -Z/--show-row-num, which would stop del-header removing blank lines
-Z/--show-row-num
del-header
$ cat example.txt | csvtk cut -f species -Z | csvtk del-header | csvtk cut -f -1 | wc -l 162 $ cat example.txt | wc -l 163
No branches or pull requests
Prerequisites
csvtk version
Describe your issue
csvtk del-header
on one column removes the empty cells.example.txt
Empty cells are included:
Empty cells are removed:
The text was updated successfully, but these errors were encountered: