#csv #split

bin+lib split-csv

Split a lage csv file into multiple files

2 unstable releases

1.0.0-alpha.0 Dec 17, 2021
0.1.2 Jan 13, 2022
0.0.9 Jan 4, 2022
0.0.8 Dec 19, 2021

#1516 in Command line utilities

Download history 11/week @ 2022-11-24 10/week @ 2022-12-01 14/week @ 2022-12-08 17/week @ 2022-12-15 3/week @ 2022-12-22 2/week @ 2022-12-29 1/week @ 2023-01-05 2/week @ 2023-01-19 7/week @ 2023-01-26 7/week @ 2023-02-02 37/week @ 2023-02-09 36/week @ 2023-02-16 1/week @ 2023-02-23 1/week @ 2023-03-02 4/week @ 2023-03-09

54 downloads per month

MIT and AGPL-3.0

295KB
253 lines

split-csv

Experimental branch

Simple command to split into N number of files the contents of one big CSV.

Installation

Simply run:

cargo install split-csv

Or use the GitHub version:

cargo install --git https://github.com/AOx0/csv-split

Usage

spcsv 0.1.2
Split a lage csv file into multiple files

USAGE:
    spcsv [OPTIONS] <FILE> <NUMBER_OF_FILES>

ARGS:
    <FILE>               The csv file to split
    <NUMBER_OF_FILES>    The number of files to be created with the contents of the original csv
                         file

OPTIONS:
    -h, --help                 Print help information
    -n, --not-signed-file      The first line of FILE is NOT a header line. [By default it is]
    -r, --remaining-in-last    Write remaining lines in the last file [By default remaining rows are
                               written to a new extra file]
    -v, --verbose              Print when file is created
    -V, --version              Print version information

Example:

spcsv COVID19.csv 100

The example above will split the lines of Covid.csv along a hundred files with the names: Covid_1.csv, Covid_2.csv, Covid_3.csv, ..., Covid_99.csv, Covid_100.csv.

Dependencies

~5–10MB
~172K SLoC