Skip to content

Row repeater by as many times as the value in specific column from CSV-formatted files

License

Notifications You must be signed in to change notification settings

ctylim/reprow-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reprow-rs

Row repeater by as many times as the value in specific column from CSV-formatted files

Usage

USAGE:
    reprow-rs [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --col <STRING>
            Sets column which specifies times to repeat rows.
            Rows are skipped if the column is non-positive integer.
        --dst <PATH>
            Sets destination file path. If not set, destination sets to stdout. (default: stdout)

        --log <off|error|warn|info|debug|trace>    Sets log level. (default: off)
        --src <PATH>
            Sets source file path. If not set, source sets to stdin. (default: stdin)

Example

in.csv

letter,count
a,3
b,0
c,4
d,1
$ reprow-rs --src in.csv --col count --dst out.csv 

out.csv

letter,count
a,3
a,3
a,3
c,4
c,4
c,4
c,4
d,1

About

Row repeater by as many times as the value in specific column from CSV-formatted files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages