CSV / TSV
Kotlin DataFrame supports reading from and writing to CSV and TSV files.
Requires the dataframe-csv module, which is included by default in the general dataframe artifact and in %use dataframe for Kotlin Notebook.
Read
You can read a DataFrame from a CSV or TSV file (via a file path or URL) using the readCsv() or readTsv() methods:
val df = DataFrame.readCsv("example.csv")
val df = DataFrame.readCsv("https://kotlin.github.io/dataframe/resources/example.csv")
Write
You can write a DataFrame to a CSV file using the writeCsv() method:
df.writeCsv("example.csv")
Deephaven CSV
The dataframe-csv module uses the high-performance Deephaven CSV library under the hood for fast and efficient CSV reading and writing.
If you're working with large CSV files, you can adjust the parser manually by configuring Deephaven-specific parameters to get the best performance for your use case.
24 October 2025