[//]: # (title: map) Creates [`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/), [DataFrame](DataFrame.md) or [DataColumn](DataColumn.md) with values computed from rows of original [DataFrame](DataFrame.md). **Related operations**: [](addRemove.md) **Map into `List`:** ```text map { rowExpression }: List rowExpression: DataRow.(DataRow) -> Value ``` ```kotlin df.map { 2021 - it.age } ``` **Map into `DataColumn`:** ```text mapToColumn(columnName) { rowExpression }: DataColumn rowExpression: DataRow.(DataRow) -> Value ``` ```kotlin df.mapToColumn("year of birth") { 2021 - age } ``` ```kotlin df.mapToColumn("year of birth") { 2021 - "age"() } ``` See [row expressions](DataRow.md#row-expressions) **Map into [`DataFrame`](DataFrame.md):** ```kotlin mapToFrame { columnMapping columnMapping ... } : DataFrame columnMapping = column into columnName | columnName from column | columnName from { rowExpression } | +column ``` ```kotlin df.mapToFrame { "year of birth" from { 2021 - age } expr { age > 18 } into "is adult" name.lastName.map { it.length } into "last name length" "full name" from { name.firstName + " " + name.lastName } +city } ``` ```kotlin df.mapToFrame { "year of birth" from { 2021 - "age"() } expr { "age"() > 18 } into "is adult" "name"["lastName"]().map { it.length } into "last name length" "full name" from { "name"["firstName"]() + " " + "name"["lastName"]() } +"city" } ```