Skip to content
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

csvsed: sed for tabular data #595

Closed
wants to merge 8 commits into from
Closed

csvsed: sed for tabular data #595

wants to merge 8 commits into from

Conversation

qauge
Copy link

@qauge qauge commented Apr 5, 2016

What about adding a csvsed utility to csvkit?

I think the name speaks for itself. Here is a short example:

$ cat sample.csv \
  | csvsed -c Wage -m s/,//g \                                     # remove commas from the Wage column
  | csvsed -c Status -m 'y/A-Z/a-z/' \                           # convert Status to all lowercase
  | csvsed -c Status -m 's/.*(ok|good).*/\1/'                 # restrict to keywords 'ok' & 'good'

The code (GPL) is adapted from https://github.com/metagriffin/csvsed with the authorization of its original author (metagriffin).

csvkit is amazing, by the way. I used it intensively during the last year. Thank you!

@qauge qauge changed the title Csvsed csvsed: sed for tabular data Apr 5, 2016
@qauge
Copy link
Author

qauge commented Apr 6, 2016

Unfortunately, the tests won't pass on master either (at least on my machine).
I refer to #596.

@jpmckinney
Copy link
Member

@jpmckinney
Copy link
Member

Looks like error is in most recent version of agate (error occurs between version 1.3.0 and 1.3.1)

@jpmckinney
Copy link
Member

Thank you for preparing this new CSV tool. However, the maintainers have decided to not merge and maintain new tools; there is simply not enough time to maintain new tools. Our focus is instead on making the existing tools as good as possible.

We encourage you to release and maintain your tool as a separate Python package. You may want to use the agate library, which csvkit uses for most of its CSV reading and writing. Doing so will make it easier to maintain common behavior with csvkit’s tools.

@jpmckinney jpmckinney closed this Jun 9, 2016
@CMCDragonkai
Copy link

Damn I was hoping this would be available.

jpmckinney pushed a commit that referenced this pull request May 31, 2018
lcorbasson pushed a commit to lcorbasson/csvkit that referenced this pull request Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants