Kotlin / Kotlin/dataframe

Give schema type along with read function

Open
#481 2 comments 0 reactions 1 assignee View on GitHub

@koperagen is already working on this.

Since Mar 26, 2026.

API enhancement research
Dominant language
Kotlin
Stars
1.1k
Forks
83
Avg merge
4d 12h
Merged PRs (30d)
30

Description

As far as I can tell, the DataFrame.readCSV() functionality has very limited ability to specify the schema.

For example, there is already the following functionality:

data class Person(val name: String, val age: Int)

val persons = listOf(Person("Alice", 15), Person("Bob", 20), Person("Charlie", 22))
val df = persons.toDataFrame()   

This creates a DataFrame<Person> instance.

How about something like:

DataFrame<Person>.readCSV(...)

I know that we can use a cast<Person>(), but why not permit the functionality by default and avoid casting.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.