<commit_before>---
layout: index
---

[![Build Status](https://travis-ci.org/nrinaudo/kantan.csv.svg?branch=master)](https://travis-ci.org/nrinaudo/kantan.csv)
[![codecov](https://codecov.io/gh/nrinaudo/kantan.csv/branch/master/graph/badge.svg)](https://codecov.io/gh/nrinaudo/kantan.csv)
[![Latest version](https://index.scala-lang.org/nrinaudo/kantan.csv/kantan.csv/latest.svg)](https://index.scala-lang.org/nrinaudo/kantan.csv)
[![Join the chat at https://gitter.im/nrinaudo/kantan.csv](https://img.shields.io/badge/gitter-join%20chat-52c435.svg)](https://gitter.im/nrinaudo/kantan.csv)

kantan.csv is a library for CSV parsing and serialisation written in the
[Scala programming language](http://www.scala-lang.org).

## Getting started

kantan.csv is currently available for Scala 2.11 and 2.12.

The current version is `@VERSION@`, which can be added to your project with one or more of the following line(s)
in your SBT build file:

```scala
// Core library, included automatically if any other module is imported.
libraryDependencies += "com.nrinaudo" %% "kantan.csv" % "@VERSION@"

// Java 8 date and time instances.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-java8" % "@VERSION@"

// Provides scalaz type class instances for kantan.csv, and vice versa.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-scalaz" % "@VERSION@"

// Provides cats type class instances for kantan.csv, and vice versa.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-cats" % "@VERSION@"

// Automatic type class instances derivation.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-generic" % "@VERSION@"

// Provides instances for joda time types.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-joda-time" % "@VERSION@"

// Provides instances for refined types.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-refined" % "@VERSION@"
```

Additionally, while kantan.csv comes with a default parser / serializer (that has
[pretty good]({{ site.baseurl }}/tut/benchmarks.html) performances), some people might prefer to use older, more
reputable implementations. The following engines are currently supported:

```scala
// opencsv engine.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-opencsv" % "@VERSION@"

// commons-csv engine.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-commons" % "@VERSION@"

// jackson-csv engine.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-jackson" % "@VERSION@"
```


## Motivation

CSV is an unreasonably popular data exchange format. It suffers from poor (or at the very least late) standardisation,
and is often a nightmare to work with when it contains more complex data than just lists of numerical values.<commit_msg>Fix a link to a benchmark page<commit_after>---
layout: index
---

[![Build Status](https://travis-ci.org/nrinaudo/kantan.csv.svg?branch=master)](https://travis-ci.org/nrinaudo/kantan.csv)
[![codecov](https://codecov.io/gh/nrinaudo/kantan.csv/branch/master/graph/badge.svg)](https://codecov.io/gh/nrinaudo/kantan.csv)
[![Latest version](https://index.scala-lang.org/nrinaudo/kantan.csv/kantan.csv/latest.svg)](https://index.scala-lang.org/nrinaudo/kantan.csv)
[![Join the chat at https://gitter.im/nrinaudo/kantan.csv](https://img.shields.io/badge/gitter-join%20chat-52c435.svg)](https://gitter.im/nrinaudo/kantan.csv)

kantan.csv is a library for CSV parsing and serialisation written in the
[Scala programming language](http://www.scala-lang.org).

## Getting started

kantan.csv is currently available for Scala 2.11 and 2.12.

The current version is `@VERSION@`, which can be added to your project with one or more of the following line(s)
in your SBT build file:

```scala
// Core library, included automatically if any other module is imported.
libraryDependencies += "com.nrinaudo" %% "kantan.csv" % "@VERSION@"

// Java 8 date and time instances.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-java8" % "@VERSION@"

// Provides scalaz type class instances for kantan.csv, and vice versa.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-scalaz" % "@VERSION@"

// Provides cats type class instances for kantan.csv, and vice versa.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-cats" % "@VERSION@"

// Automatic type class instances derivation.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-generic" % "@VERSION@"

// Provides instances for joda time types.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-joda-time" % "@VERSION@"

// Provides instances for refined types.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-refined" % "@VERSION@"
```

Additionally, while kantan.csv comes with a default parser / serializer (that has
[pretty good]({{ site.baseurl }}/benchmarks.html) performances), some people might prefer to use older, more
reputable implementations. The following engines are currently supported:

```scala
// opencsv engine.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-opencsv" % "@VERSION@"

// commons-csv engine.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-commons" % "@VERSION@"

// jackson-csv engine.
libraryDependencies += "com.nrinaudo" %% "kantan.csv-jackson" % "@VERSION@"
```


## Motivation

CSV is an unreasonably popular data exchange format. It suffers from poor (or at the very least late) standardisation,
and is often a nightmare to work with when it contains more complex data than just lists of numerical values.
{'fraction_non_alphanumeric': 0.14640014806588933, 'fraction_numerical': 0.00555247084952804, 'mean_word_length': 4.773504273504273, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 18, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5364785', 'n_tokens_mistral': 1850, 'n_tokens_neox': 1710, 'n_words': 477}