# Modules

> For the complete documentation index, see [llms.txt](https://kotlin.github.io/dataframe/llms.txt).

Kotlin DataFrame is composed of modules, allowing you to include only the functionality you need. In addition, Kotlin DataFrame provides several [plugins](#plugins) that significantly enhance the development experience — making it more convenient, powerful, and enjoyable to work with.

API reference: [API reference](https://kotlin.github.io/dataframe/api-docs/index.html)

| Module | Function |
| --- | --- |
| [General](#dataframe-general) |
| [dataframe](#dataframe-general) | General artifact – combines all core and IO artifacts except experimental ones. |
| [Core](#core-modules) |
| `[dataframe-core](#dataframe-core)` | The [DataFrame](dataframe.html) API and its implementation. |
| [IO](#io-modules) |
| `[dataframe-json](#dataframe-json)` | Provides support for JSON format writing and reading. |
| `[dataframe-csv](#dataframe-csv)` | Provides support for CSV format writing and reading. |
| `[dataframe-excel](#dataframe-excel)` | Provides support for XSL/XLSX format writing and reading. |
| `[dataframe-jdbc](#dataframe-jdbc)` | Provides support for JDBC data sources reading. |
| `[dataframe-arrow](#dataframe-arrow)` | Provides support for [Apache Arrow](https://arrow.apache.org) format writing and reading. Provides support for reading [Apache Parquet](https://parquet.apache.org/) files through [Apache Arrow Dataset](https://arrow.apache.org/docs/java/dataset.html) |
| [Experimental modules](#experimental-modules) |
| `[dataframe-geo](#dataframe-geo)` | Provides a new API for working with geospatial data and IO for geographic formats (GeoJSON, Shapefile). |
| `[dataframe-openapi](#dataframe-openapi)` | Provides support for [OpenAPI JSON format](https://www.openapis.org) reading and writing. |
| `[dataframe-openapi-generator](#dataframe-openapi-generator)` | Provides [schema generation](schemas.html) from OpenAPI specifications. Requires `dataframe-openapi`. |
| [Plugins](#plugins) |
| `[kotlin.plugin.dataframe](#kotlin.plugin.dataframe)` | Kotlin compiler plugin. Provides compile-time [extension properties](extensionpropertiesapi.html) generation.  |

## Configure the repository

All Kotlin DataFrame modules are available from the Maven Central repository. To use them, add the appropriate repository to your `repositories` block:

Kotlin DSL:

```KOTLIN
repositories {
    mavenCentral()
}
```

Groovy DSL:

```KOTLIN
repositories {
    mavenCentral()
}
```

##  `dataframe` - general Kotlin DataFrame dependency 

General-purpose artifact that includes all [core](#core-modules) and [IO](#io-modules) modules.

Does not include any [experimental modules](#experimental-modules).

Recommended if you don’t need fine-grained control over individual module dependencies.

Kotlin DSL:

```KOTLIN
dependencies {
    implementation("org.jetbrains.kotlinx:dataframe:1.0.0-rc02")
}
```

Groovy DSL:

```GROOVY
dependencies {
    implementation 'org.jetbrains.kotlinx:dataframe:1.0.0-rc02'
}
```

## Core Kotlin DataFrame modules

###  `dataframe-core` 

The core [DataFrame](dataframe.html) API and its implementation.

Includes all core functionality for working with data structures, expressions, schema management, and operations.

Kotlin DSL:

```KOTLIN
dependencies {
    implementation("org.jetbrains.kotlinx:dataframe-core:1.0.0-rc02")
}
```

Groovy DSL:

```GROOVY
dependencies {
    implementation 'org.jetbrains.kotlinx:dataframe-core:1.0.0-rc02'
}
```

## IO Kotlin DataFrame modules

###  `dataframe-json` 

Provides all logic for DataFrame to be able to work with JSON data sources; [reading](https://kotlin.github.io/dataframe/read.html#read-from-json) and [writing](https://kotlin.github.io/dataframe/write.html#writing-to-json). It's based on [Kotlinx Serialization](https://github.com/Kotlin/kotlinx.serialization).

Kotlin DSL:

```KOTLIN
dependencies {
    implementation("org.jetbrains.kotlinx:dataframe-json:1.0.0-rc02")
}
```

Groovy DSL:

```GROOVY
dependencies {
    implementation 'org.jetbrains.kotlinx:dataframe-json:1.0.0-rc02'
}
```

###  `dataframe-csv` 

Provides support for reading and writing CSV files.

Supports standard CSV format features such as delimiters, headers, and quotes.

Based on high-performance [Deephaven CSV](https://github.com/deephaven/deephaven-csv).

Kotlin DSL:

```KOTLIN
dependencies {
    implementation("org.jetbrains.kotlinx:dataframe-csv:1.0.0-rc02")
}
```

Groovy DSL:

```GROOVY
dependencies {
    implementation 'org.jetbrains.kotlinx:dataframe-csv:1.0.0-rc02'
}
```

Note that `dataframe-json` is included with `dataframe-csv` by default. This is to support JSON structures inside CSV files. If you don't need this functionality, you can exclude it like so:

Kotlin DSL:

```KOTLIN
dependencies {
    implementation("org.jetbrains.kotlinx:dataframe-csv:1.0.0-rc02") {
        exclude("org.jetbrains.kotlinx", "dataframe-json")
    }
}
```

Groovy DSL:

```GROOVY
dependencies {
    implementation('org.jetbrains.kotlinx:dataframe-csv:1.0.0-rc02') {
        exclude group: 'org.jetbrains.kotlinx', module: 'dataframe-json'
    }
}
```

###  `dataframe-excel` 

Provides support for reading and writing Excel files (`.xls` and `.xlsx`).

Compatible with standard spreadsheet editors and supports embedded structured data.

Kotlin DSL:

```KOTLIN
dependencies {
    implementation("org.jetbrains.kotlinx:dataframe-excel:1.0.0-rc02")
}
```

Groovy DSL:

```GROOVY
dependencies {
    implementation 'org.jetbrains.kotlinx:dataframe-excel:1.0.0-rc02'
}
```

Note that `dataframe-json` is included with `dataframe-excel` by default. This is to support JSON structures inside Excel files. If you don't need this functionality, you can exclude it like so:

Kotlin DSL:

```KOTLIN
dependencies {
    implementation("org.jetbrains.kotlinx:dataframe-excel:1.0.0-rc02") {
        exclude("org.jetbrains.kotlinx", "dataframe-json")
    }
}
```

Groovy DSL:

```GROOVY
dependencies {
    implementation('org.jetbrains.kotlinx:dataframe-excel:1.0.0-rc02') {
        exclude group: 'org.jetbrains.kotlinx', module: 'dataframe-json'
    }
}
```

When packaging this module into a fat JAR, merge `META-INF/services` resources as described in [Packaging into a fat JAR](packaging.html).

###  `dataframe-jdbc` 

Provides all logic for DataFrame to be able to work with

SQL databases that implement the JDBC protocol.

See [Read from SQL databases](https://kotlin.github.io/dataframe/readsqldatabases.html) for more information about how to use it.

Kotlin DSL:

```KOTLIN
dependencies {
    implementation("org.jetbrains.kotlinx:dataframe-jdbc:1.0.0-rc02")
}
```

Groovy DSL:

```GROOVY
dependencies {
    implementation 'org.jetbrains.kotlinx:dataframe-jdbc:1.0.0-rc02'
}
```

###  `dataframe-arrow` 

Provides all logic and tests for DataFrame to be able to work with [Apache Arrow](https://arrow.apache.org), and for reading [Apache Parquet](https://parquet.apache.org/) through [Apache Arrow Dataset](https://arrow.apache.org/docs/java/dataset.html). Writing Parquet is not supported.

See [Apache Arrow](apachearrow.html) and [Parquet](parquet.html), or [Read Apache Arrow formats](read.html#read-apache-arrow-formats) and [Writing to Apache Arrow formats](write.html#writing-to-apache-arrow-formats) for more information about how to use it.

Kotlin DSL:

```KOTLIN
dependencies {
    implementation("org.jetbrains.kotlinx:dataframe-arrow:1.0.0-rc02")
}
```

Groovy DSL:

```GROOVY
dependencies {
    implementation 'org.jetbrains.kotlinx:dataframe-arrow:1.0.0-rc02'
}
```

## Experimental Kotlin DataFrame modules

These modules are experimental and may be unstable.

###  `dataframe-geo` 

Provides a new API for working with geospatial data, including reading and writing geospatial formats (GeoJSON, Shapefile), and performing geometry-aware operations.

See [Geo guide](https://kotlin.github.io/kandy/geo-plotting-guide.html) for more details and examples.

Requires [OSGeo Repository](https://repo.osgeo.org).

Kotlin DSL:

```KOTLIN
repositories {
    maven("https://repo.osgeo.org/repository/release")
}

dependencies {
    implementation("org.jetbrains.kotlinx:dataframe-geo:1.0.0-rc02")
}
```

Groovy DSL:

```GROOVY
repositories {
    maven {
        url 'https://repo.osgeo.org/repository/release'
    }
}

dependencies {
    implementation 'org.jetbrains.kotlinx:dataframe-geo:1.0.0-rc02'
}
```

###  `dataframe-openapi` 

Provides functionality to support auto-generated data schemas from OpenAPI 3.0.0 specifications.

This module is a companion to [dataframe-openapi-generator](#dataframe-openapi-generator):

* `dataframe-openapi-generator` is used internally by the Gradle plugin and Jupyter integration to generate data schemas from OpenAPI specs. In the Gradle plugin, it powers the `dataschemas {}` DSL and the `@file:ImportDataSchema()` annotation. In Jupyter, it enables the `importDataSchema()` function.

* `dataframe-openapi` must be added as a dependency to the user project in order to use those generated data schemas.

See:

* [Import OpenAPI Schemas in Gradle project](https://kotlin.github.io/dataframe/schemasimportopenapigradle.html)

* [Import Data Schemas, e.g. from OpenAPI, in Jupyter](https://kotlin.github.io/dataframe/schemasimportopenapijupyter.html)

Kotlin DSL:

```KOTLIN
dependencies {
    implementation("org.jetbrains.kotlinx:dataframe-openapi:1.0.0-rc02")
}
```

Groovy DSL:

```GROOVY
dependencies {
    implementation 'org.jetbrains.kotlinx:dataframe-openapi:1.0.0-rc02'
}
```

###  `dataframe-openapi-generator` 

Provides the logic and tooling necessary to import OpenAPI 3.0.0 specifications as auto-generated data schemas for Kotlin DataFrame. This module works in conjunction with [dataframe-openapi](#dataframe-openapi):

* `dataframe-openapi-generator` is used internally by the Gradle plugin and Jupyter integration to generate data schemas from OpenAPI specifications. * In Gradle, it enables the `dataschemas {}` DSL and the `@file:ImportDataSchema()` annotation. * In Jupyter, it powers the `importDataSchema()` function.

* `dataframe-openapi` must be added as a dependency to the user project to actually use the generated schemas.

See:

* [Import OpenAPI Schemas in Gradle project](https://kotlin.github.io/dataframe/schemasimportopenapigradle.html)

* [Import Data Schemas, e.g. from OpenAPI, in Jupyter](https://kotlin.github.io/dataframe/schemasimportopenapijupyter.html)

Kotlin DSL:

```KOTLIN
dependencies {
    implementation("org.jetbrains.kotlinx:dataframe-openapi-generator:1.0.0-rc02")
}
```

Groovy DSL:

```GROOVY
dependencies {
    implementation 'org.jetbrains.kotlinx:dataframe-openapi-generator:1.0.0-rc02'
}
```

## Plugins

###  `kotlin.plugin.dataframe` — Kotlin DataFrame Compiler Plugin 

[Kotlin DataFrame Compiler Plugin](compiler-plugin.html) enables automatic generation of [extension properties](extensionpropertiesapi.html) and updates [data schemas](schemas.html) on-the-fly in Gradle projects, making development with Kotlin DataFrame faster, more convenient, and fully type- and name-safe.

> **Note:**
> Requires Kotlin 2.2.20-Beta1 or higher.

To enable the plugin in your Gradle project, add it to the `plugins` section:

Kotlin DSL:

```KOTLIN
plugins {
    kotlin("plugin.dataframe") version "2.4.21"
}
```

Groovy DSL:

```GROOVY
plugins {
    id 'org.jetbrains.kotlin.plugin.dataframe' version '2.4.21'
}
```

If you're using a version older than Kotlin 2.4.0, incremental compilation must be disabled due to [this issue](https://youtrack.jetbrains.com/issue/KT-66735). Add the following line to your `gradle.properties` file:

```PROPERTIES
kotlin.incremental=false
```

Published as a Kotlin official plugin. [Source code is available in the Kotlin repository](https://github.com/JetBrains/kotlin/tree/master/plugins/kotlin-dataframe).

