-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
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
Headers suggestions #96
Comments
The underlying CSV reader supports commented lines, so I think this should be straight-forward to add. |
I'm getting with the same question. Though a few commands like "sed/grep -v" before using xsv can solve the problem, it's a little annoying especially in |
Another vote for |
Another vote for --set-headers . |
I was just re-evaluating various CSV libraries, so this was the 1st time I actually tried using Intuitively I was expecting to find header rename functionality under the After gathering the general thinking behind the command line arguments, we could argue for putting it under Is there a design document for the structure of the command line options somewhere? Knowing the logic behind the design would even help with learning this command line interface, In spirit I feel What I was expecting to find are the following:
It's okay if it doesn't work this way, but it should be stated somewhere; that would be helpful. |
There is no design document. The Unix philosophy is a means to an end. Please focus on specific and actionable issues and avoid abstract discussion of philosophies that are so broad that they can be interpreted in any one of a number of ways. Linking to catv, for example, is almost certainly unhelpful. (I empathize with a lot of the opinions expressed on catv, but I mostly see the web site as a place where a bunch of people go to whine. Sorry.) |
I would also love to have an option to "add headers" (or, actually, |
It would be nice to have some additional header related options.
In the files I work with, there is very often a header line which starts with a comment.
It would be nice to have an option to strip of the leading '#' or '# ' of the header name.
Some other files have multiple commented lines:
In this case it would be useful to be able to skip the first 17 lines and use line 18 as header:
Or an option to skipping commented lines (and a --comment argument to specify the comment character or string) would be nice too:
Also an option to set a header would be nice as this could be used to set headers on files without header or when combined with the --skip-commented-lines option to set a header in case the header line was commented.
--set-headers, --skip-commented-lines, --comment are probably the most general applicable options to implement.
The following option seems to be missing in input, which seems odd to me:
The text was updated successfully, but these errors were encountered: