Giter Site home page Giter Site logo

sacsv's Introduction

sacsv: Swiss Army csv

This Python package provides an assortment of command-line tools to manipulate csv-formatted data. The tools are:

  • csv2jsonl: converts csv input into jsonlines
  • csvaddrandom: adds a column with a random number
  • csvadduniqueid: adds a column with a unique record identifier
  • csvaggregate: applies an arbitrary Python function to every value of a column, possibly within groups
  • csvappend: appends two or more csv files
  • csvdropdups: drops duplicate records
  • csvfindsortkey: attempts to find the column that the input is sorted by
  • csvkeepmax: keeps the record that has the maximum value in a column
  • csvleftjoin: merges two csv files
  • csvop: applies an arbitrary Python function to every record and saves the return value in a new column
  • csvparallel: parallelizes arbitrary commands that read a csv input and write a csv output
  • csvrename: changes the name of a column
  • csvreorder: changes the order of columns
  • csvsed: applies a substitution rule, using regular expressions, to every value of a column
  • csvsort: sorts the input
  • csvtranspose: transposes the input
  • fw2csv: converts fixed-width input, potentially with multi-line records, into csv
  • longcsv2wide: converts the input from long to wide form
  • widecsv2long: converts the input from wide to long form

Illustration of csvparallel executing f.py in 8 jobs

Installation

To install this package using pip, type

pip install git+https://github.com/gn0/sacsv

or, alternatively,

git clone https://github.com/gn0/sacsv
pip install ./sacsv

Author

Gabor Nyeki. Contact information is on http://www.gabornyeki.com/.

License

This package is licensed under the Creative Commons Attribution 4.0 International License: http://creativecommons.org/licenses/by/4.0/.

sacsv's People

Contributors

gn0 avatar

Stargazers

WW Henderson avatar Flavio Clesio avatar Apoorva Lal avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.