# Modify

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

API reference: [api package](https://kotlin.github.io/dataframe/api-docs/core/org.jetbrains.kotlinx.dataframe.api/index.html)

> **Tip:**
> [DataFrame](dataframe.html) object is immutable and all operations return a new instance of [DataFrame](dataframe.html).

## Naming conventions

[DataFrame](dataframe.html) is a columnar data structure and is more oriented to column-wise operations. Most transformation operations start with [column selector](columnselectors.html) that selects target columns for the operation. Syntax of most column operations assumes that they are applied to columns, so they don't include word `column` in their naming.

On the other hand, the Kotlin DataFrame library follows `Kotlin Collections` naming for row-wise operations as [DataFrame](dataframe.html) can be interpreted as a [Collection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/) of rows. The slight naming difference with `Kotlin Collection` is that all operations are named in imperative way: `sortBy`, `shuffle` etc.

Pairs of column/row operations:

* [add](add.html) columns / [append](append.html) rows

* [remove](remove.html) columns / [drop](drop.html) rows

* [select](select.html) columns / [filter](filter.html) rows

* [group](group.html) columns / [groupBy](groupby.html) for rows

* [reorder](reorder.html) columns / [sortBy](sortby.html) for rows

* [join](join.html) to unite columns / [concat](concat.html) to unite rows

Horizontal (column) operations:

* [add](add.html) — add columns

* [addId](add.html#addid) — add `id` column

* [flatten](flatten.html) — remove column groupings recursively

* [group](group.html) — group columns into [ColumnGroup](datacolumn.html#columngroup)

* [insert](insert.html) — insert column

* [map](map.html) — map columns into new [DataFrame](dataframe.html) or [DataColumn](datacolumn.html)

* [merge](merge.html) — merge several columns into one

* [move](move.html) — move columns or change column groupings

* [remove](remove.html) — remove columns

* [rename](rename.html) — rename columns

* [reorder](reorder.html) — reorder columns

* [replace](replace.html) — replace columns

* [select](select.html) — select subset of columns

* [split](split.html) — split values into new columns

* [ungroup](ungroup.html) — remove column grouping

Vertical (row) operations:

* [append](append.html) — add rows

* [concat](concat.html) — union rows from several [DataFrame](dataframe.html) objects

* [distinct](distinct.html) / [distinctBy](distinct.html#distinctby) — remove duplicated rows

* [drop](drop.html) / [dropLast](slicerows.html#droplast) / [dropWhile](slicerows.html#dropwhile) / [dropNulls](drop.html#dropnulls) / [dropNA](drop.html#dropna) — remove rows by condition

* [duplicate](duplicate.html) — duplicate rows

* [explode](explode.html) — spread lists and [DataFrame](dataframe.html) objects vertically into new rows

* [filter](filter.html) — filter rows

* [implode](implode.html) — merge column values into lists grouping by other columns

* [reverse](reverse.html) — reverse rows

* [shuffle](shuffle.html) — reorder rows randomly

* [sortBy](sortby.html) / [sortByDesc](sortby.html#sortbydesc) / [sortWith](sortby.html#sortwith) — sort rows

* [split](split.html) — split values into new rows

* [take](slicerows.html#take) / [takeLast](slicerows.html#takelast) / [takeWhile](slicerows.html#takewhile) — get first/last rows

Value modification:

* [convert](convert.html) — convert values into new types

* [parse](parse.html) — try to convert `String` values into appropriate types

* [unfold](unfold.html) — convert / "unfold" objects to [ColumnGroup](datacolumn.html#columngroup)

* [update](update.html) — update values preserving column types

* [fillNulls](fill.html#fillnulls) / [fillNaNs](fill.html#fillnans) / [fillNA](fill.html#fillna) — replace missing values

Reshaping:

* [pivot](pivot.html) / [pivotCounts](pivot.html#pivotcounts) / [pivotMatches](pivot.html#pivotmatches) — convert values into new columns

* [gather](gather.html) — convert pairs of column names and values into `key` and `value` columns

Learn how to:

* [Slice rows](slicerows.html)

* [Select columns](select.html)

* [Filter rows](filterrows.html)

* [Reorder rows](reorderrows.html)

* [Group/concat rows](groupbyconcat.html)

* [Update/convert values](updateconvert.html)

* [Split/merge values](splitmerge.html)

* [Add/map/remove columns](addremove.html)

* [Move/rename columns](moverename.html)

* [Group/ungroup/flatten columns](groupungroupflatten.html)

* [Insert/replace columns](insertreplace.html)

* [Explode/implode columns](explodeimplode.html)

* [Pivot/gather columns](pivotgather.html)

* [Append values](append.html)

* [Adjust schema](adjustschema.html)

