-
Notifications
You must be signed in to change notification settings - Fork 603
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
Made a tool to rename columns, want to integrate it #814
Comments
Adding link to review: master...culebron:master |
How do you handle a column name containing a colon? (or whatever separator character you might switch to) |
For reference, earlier issues include #530. The above implementation is streaming (good). Just noting that the implementation of |
Good question about the colon. Let me look into My idea now is to add another parameter: |
I'm in favour of a rename tool in csvkit! BTW, renaming columns is very close to adding columns - any ideas to integrate this functionality in the new tool? (I know about the adding via |
@halloleo In what way does it not work well with |
I have to clarify: It does work as advertised, but it is a bit cumbersome: First you create a new column at the end,then yiou can move the column via a 2nd csvcut call into the order where you want it... |
Closing in favor of #396 |
Example: I often have to export data from MongoDB where columns are extracted from an hierarchy, and have weird names.
There's no direct way in csvkit to rename those columns, only remove them completely or write a pipe, something like
echo "column1,column2" > my_file.csv && head +2 >> my_file.csv
.I suggest to make a tool or an option to rename columns.
Option 1: a parameter to
csvcut
:Option 2: a separate tool:
I have a working version of the latter in my repo. Please write what you think of this.
The text was updated successfully, but these errors were encountered: