Files
kotlin-fork/samples/csvparser
Ilya Matveev d28f8ce7f2 samples: Add scripts for samples building
This pach adds a root gradle project in the samples directory
which allows one to build all gradle samples using `./gradlew build`
command. It also adds a shell script in the samples directory which
can build all samples (excluding tensorflow one) using their build.sh
scripts.
2017-05-15 18:31:30 +07:00
..
2017-03-31 10:20:29 +03:00
2017-04-04 17:32:12 +02:00
2017-04-26 20:07:06 +03:00

CSV parser

This example shows how one could implement simple comma separated values reader and parser in Kotlin. A sample data European Mammals Red List for 2009 from EU is being used.

To build use ./build.sh script without arguments (or specify TARGET variable if cross-compiling). You also may use Gradle to build this sample: ../gradlew build.

To run use

./CsvParser.kexe ./European_Mammals_Red_List_Nov_2009.csv 4 100

It will print number of all unique entries in fifth column (Family, zero-based index) in first 100 rows of the CSV file.