Giter Site home page Giter Site logo

csv2json's Introduction

csv2json

Will export fields from a CSV file to a JSON file.

Usage

csv2json accepts the following arguments:

argument (short) argument (long) description
-h --help Prints a message describing the arguments and their usage
-i INPUT FILE --input INPUT FILE Required The path to the input file (CSV format)
-o OUTPUT FILE --output OUTPUT FILE Required The path to the output file (JSON format). This file will be overwritten if it exists.
-n NUM ROWS --num-rows NUM ROWS Optional The maximum number of rows to be exported. If the value is less than 0, then all rows will be exported (default). If the value is greater than 0 then no more than that value will be exported. If the value is 0, then no rows will be exported, but the header row will be read and parsed.
-f FIELDS --fields FIELDS Optional A comma-separated list of field names that should be exported. If this argument is ommitted (default) or none of the requested fields actually appear in the header, then all fields will be exported, otherwise only the requested fields will be exported.
-c CONDITION --condition CONDITION Optional A 'natural language' predicate string that can be used to export only the rows matching the predicate. For example, if dealing with a file with U.S. zip codes, it may be that you only want zip codes for a certain state. In this case you could supply a condition like "state is 'CO'".

csv2json's People

Contributors

keith-mcqueen avatar

Watchers

James Cloos avatar  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.