NAME

App::lcpan::Manual::Cookbook - App::CSVUtils cookbook

VERSION

This document describes version 0.032 of App::lcpan::Manual::Cookbook (from Perl distribution App-CSVUtils), released on 2020-08-16.

DESCRIPTION

This document lists the various tasks you can do with the scripts included in App::CSVUtils distribution.

ADDING COLUMNS

TODO.

ADDING ROWS

TODO.

ADDING SUMMARY ROW (TOTAL, AVERAGE, ETC)

TODO.

CONVERTING TO OTHER FORMATS

To CSV

TODO.

To JSON

TODO.

To Perl data structure

TODO.

To TSV

TODO.

To YAML

TODO.

DEALING WITH NEWLINES IN CSV

TODO.

DEALING WITH NON-STANDARD CSV

The utilities allow you to set input's field separator (`--sep-char`), quote character (`--quote-char`), and escape character (`--escape-char`), so if you have semicolon as the field separator, e.g.:

 name;age;rank
 andi;20;staff
 budi;30;manager
 cinta;17;associate

and you want to sort by age:

 % csv-sort-rows INPUT.CSV --sep-char ';' --by-field age

These parameters will be passed to Text::CSV's attributes with the corresponding names.

Likewise, you can customize output's field separator (`--output-sep-char`), quote character (`--output-quote-char`), and escape character (`--output-escape-char`).

FILTERING (SELECTING) COLUMNS

TODO.

FILTERING (SELECTING) ROWS

TODO.

GETTING INFORMATION ABOUT CSV

 % csv-info INPUT.CSV

Sample output:

Listing the column names

TODO.

MERGING CSV

TODO.

See also "SPLITTING CSV".

MODIFYING COLUMNS

TODO.

MODIFYING ROWS

TODO.

PERFORMING SET OPERATIONS WITH CSV

TODO.

SORTING COLUMNS

TODO.

SORTING ROWS

TODO.

SPLITTING CSV

TODO.

See also "MERGING CSV".

TRANSPOSING

Transposing, like in a two-dimensional matrix, means switching row and colum indices to produce a new CSV where the columns become rows and vice versa. For example:

 name,age
 andi,20
 budi,30
 cinta,17

becomes:

 name,andi,budi,cinta
 age,20,30,17

To do this:

 % csv-transpose INPUT.CSV

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/App-CSVUtils.

SOURCE

Source repository is at https://github.com/perlancar/perl-App-CSVUtils.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-CSVUtils

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

Acme::CPANModules::WorkingWithCSV

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2020, 2019, 2018, 2017, 2016 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.