Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C csvkit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 61
    • Issues 61
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wireservice
  • csvkit
  • Merge requests
  • !595

csvsed: sed for tabular data

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/dhatim/csvsed into master Apr 05, 2016
  • Overview 5
  • Commits 8
  • Pipelines 0
  • Changes 7

Created by: qauge

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!

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/dhatim/csvsed