Files
kotlin-fork/samples/csvparser
SvyatoslavScherbina c1d9dc1cbb Replace CArray by CPointer (#406)
Also do some cleanup.
2017-03-28 17:44:08 +03:00
..
2017-03-25 11:35:56 +03:00
2017-03-28 17:44:08 +03:00
2017-03-27 18:16:06 +03:00
2017-03-25 11:35:56 +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] (https://data.europa.eu/euodp/en/data/dataset?res_format=CSV) from EU is being used.

To build use ./build.sh script without arguments (or specify TARGET variable if cross-compiling).

To run use

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

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