Interop with Collections

Edit page Last modified: 14 January 2025

Kotlin DataFrame and Kotlin Collection represent two different approaches to data storage:

  • DataFrame stores data by fields/columns

  • Collection stores data by records/rows

Although DataFrame doesn't implement the Collection or Iterable interface, it has many similar operations, such as filter, take, first, map, groupBy etc.

DataFrame has two-way compatibility with Map and List:

Columns, rows, and values of DataFrame can be accessed as List, Iterable and Sequence accordingly: