Skip to content

Flatten navigation of Modify operations #1312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 54 additions & 66 deletions docs/StardustDocs/d.tree
Original file line number Diff line number Diff line change
Expand Up @@ -91,73 +91,61 @@
</toc-element>
</toc-element>
<toc-element topic="modify.md">
<toc-element topic="sliceRows.md">
<toc-element topic="xs.md"/>
</toc-element>
<toc-element topic="add.md"/>
<toc-element topic="adjustSchema.md"/>
<toc-element topic="append.md"/>
<toc-element topic="cast.md"/>
<toc-element topic="concat.md"/>
<toc-element topic="convert.md"/>
<toc-element topic="convertTo.md"/>
<toc-element topic="distinct.md"/>
<toc-element topic="drop.md"/>
<toc-element topic="duplicate.md"/>
<toc-element topic="explode.md"/>
<toc-element topic="fill.md"/>
<toc-element topic="filter.md"/>
<toc-element topic="flatten.md"/>
<toc-element topic="gather.md"/>
<toc-element topic="group.md"/>
<toc-element topic="groupBy.md"/>
<toc-element topic="implode.md"/>
<toc-element topic="inferType.md"/>
<toc-element topic="insert.md"/>
<toc-element topic="join.md"/>
<toc-element topic="joinWith.md"/>
<toc-element topic="map.md"/>
<toc-element topic="merge.md"/>
<toc-element topic="move.md"/>
<toc-element topic="parse.md"/>
<toc-element topic="pivot.md"/>
<toc-element topic="remove.md"/>
<toc-element topic="rename.md"/>
<toc-element topic="reorder.md"/>
<toc-element topic="replace.md"/>
<toc-element topic="reverse.md"/>
<toc-element topic="select.md"/>
<toc-element topic="filterRows.md">
<toc-element topic="filter.md"/>
<toc-element topic="drop.md"/>
<toc-element topic="distinct.md"/>
</toc-element>
<toc-element topic="reorderRows.md">
<toc-element topic="sortBy.md"/>
<toc-element topic="shuffle.md"/>
<toc-element topic="reverse.md"/>
</toc-element>
<toc-element topic="groupByConcat.md">
<toc-element topic="groupBy.md"/>
<toc-element topic="concat.md"/>
</toc-element>
<toc-element topic="updateConvert.md">
<toc-element topic="update.md">
<toc-element topic="fill.md"/>
</toc-element>
<toc-element topic="convert.md">
<toc-element topic="parse.md"/>
<toc-element topic="unfold.md"/>
</toc-element>
<toc-element topic="inferType.md"/>
</toc-element>
<toc-element topic="splitMerge.md">
<toc-element topic="split.md"/>
<toc-element topic="merge.md"/>
</toc-element>
<toc-element topic="addRemove.md">
<toc-element topic="add.md"/>
<toc-element topic="map.md"/>
<toc-element topic="remove.md"/>
</toc-element>
<toc-element topic="moveRename.md">
<toc-element topic="move.md"/>
<toc-element topic="rename.md"/>
<toc-element topic="reorder.md"/>
</toc-element>
<toc-element topic="groupUngroupFlatten.md">
<toc-element topic="group.md"/>
<toc-element topic="ungroup.md"/>
<toc-element topic="flatten.md"/>
</toc-element>
<toc-element topic="insertReplace.md">
<toc-element topic="insert.md"/>
<toc-element topic="replace.md"/>
</toc-element>
<toc-element topic="explodeImplode.md">
<toc-element topic="explode.md"/>
<toc-element topic="implode.md"/>
</toc-element>
<toc-element topic="pivotGather.md">
<toc-element topic="pivot.md"/>
<toc-element topic="gather.md"/>
</toc-element>
<toc-element topic="appendDuplicate.md">
<toc-element topic="append.md"/>
<toc-element topic="duplicate.md"/>
</toc-element>
<toc-element topic="adjustSchema.md">
<toc-element topic="cast.md"/>
<toc-element topic="convertTo.md"/>
</toc-element>
<toc-element topic="shuffle.md"/>
<toc-element topic="sliceRows.md"/>
<toc-element topic="sortBy.md"/>
<toc-element topic="split.md"/>
<toc-element topic="toList.md"/>
<toc-element topic="unfold.md"/>
<toc-element topic="ungroup.md"/>
<toc-element topic="update.md"/>
<toc-element topic="xs.md"/>
<toc-element topic="addRemove.md" hidden="true"/>
<toc-element topic="sliceRows.md" hidden="true"/>
<toc-element topic="filterRows.md" hidden="true"/>
<toc-element topic="reorderRows.md" hidden="true"/>
<toc-element topic="groupByConcat.md" hidden="true"/>
<toc-element topic="updateConvert.md" hidden="true"/>
<toc-element topic="splitMerge.md" hidden="true"/>
<toc-element topic="moveRename.md" hidden="true"/>
<toc-element topic="groupUngroupFlatten.md" hidden="true"/>
<toc-element topic="insertReplace.md" hidden="true"/>
<toc-element topic="explodeImplode.md" hidden="true"/>
<toc-element topic="pivotGather.md" hidden="true"/>
<toc-element topic="appendDuplicate.md" hidden="true"/>
</toc-element>
<toc-element toc-title="Statistics">
<toc-element topic="summaryStatistics.md">
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Original [`DataFrame`](DataFrame.md) is not modified.
`add` appends columns to the end of the dataframe by default.
If you want to add a single column to a specific position in the dataframe, use [insert](insert.md).

**Related operations**: [](addRemove.md)

## Create a new column and add it to [`DataFrame`](DataFrame.md)

```text
Expand Down
2 changes: 1 addition & 1 deletion docs/StardustDocs/topics/addRemove.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[//]: # (title: Add / map / remove columns)

* [`add`](add.md) columns to [`DataFrame`](DataFrame.md)
* [`map`](map.md) columns to new [`DataFrame`](DataFrame.md) or [`DataColumn`](DataColumn.md)
* [`map`](map.md) columns to new [`DataFrame`](DataFrame.md), [`DataColumn`](DataColumn.md) or `List`
* [`remove`](remove.md) columns from [`DataFrame`](DataFrame.md)
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/append.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ df.append (
"John", 17,
"Bill", 30)
```

**Related operations**: [](appendDuplicate.md)
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/cast.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Changes the type argument of the [`DataFrame`](DataFrame.md) instance without ch
cast<T>(verify = false)
```

Related operations: [](adjustSchema.md)

**Parameters:**
* `verify: Boolean = false` —
when `true`, the function throws an exception if the [`DataFrame`](DataFrame.md) instance doesn't match the given schema.
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/concat.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Returns a [`DataFrame`](DataFrame.md) with the union of rows from several given [`DataFrame`](DataFrame.md) objects.

**Related operations**: [](multipleDataFrames.md)

`concat` is available for:

[`DataFrame`](DataFrame.md):
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/convert.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ colExpression = DataFrame.(DataColumn) -> DataColumn
frameExpression: DataFrame.(DataFrame) -> DataFrame
```

**Related operations**: [](updateConvert.md)

See [column selectors](ColumnSelectors.md) for how to select the columns for this operation and
[row expressions](DataRow.md#row-expressions) for how to provide new values.

Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/convertTo.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
convertTo<Schema>(excessiveColumns = ExcessiveColumns.Keep)
```

**Related operations**: [](adjustSchema.md)

Customization DSL:
* `convert`—how specific column types should be converted
* `parser`—how to parse strings into custom types
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/distinct.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Removes duplicate rows.
The rows in the resulting [`DataFrame`](DataFrame.md) are in the same order as they were in the original [`DataFrame`](DataFrame.md).

Related operations: [](filterRows.md)

<!---FUN distinct-->

```kotlin
Expand Down
4 changes: 3 additions & 1 deletion docs/StardustDocs/topics/drop.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[//]: # (title: drop)
[//]: # (title: drop / dropNulls / dropNaNs / dropNA)

<!---IMPORT org.jetbrains.kotlinx.dataframe.samples.api.Access-->

Removes all rows that satisfy [row condition](DataRow.md#row-conditions)

**Related operations**: [](filterRows.md)

<!---FUN dropWhere-->
<tabs>
<tab title="Properties">
Expand Down
3 changes: 3 additions & 0 deletions docs/StardustDocs/topics/duplicate.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ DataRow.duplicate(n): DataFrame

Returns [`FrameColumn`](DataColumn.md#framecolumn) with original [`DataFrame`](DataFrame.md) repeated `n` times.
Resulting [`FrameColumn`](DataColumn.md#framecolumn) will have an empty [`name`](DataColumn.md#properties).

**Related operations**: [](appendDuplicate.md)

```text
DataFrame.duplicate(n): FrameColumn
```
Expand Down
4 changes: 2 additions & 2 deletions docs/StardustDocs/topics/explode.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Splits list-like values in given columns and spreads them vertically. Values in
explode(dropEmpty = true) [ { columns } ]
```

**Reverse operation:** [`implode`](implode.md)

See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.

**Parameters:**
Expand All @@ -18,8 +20,6 @@ See [column selectors](ColumnSelectors.md) for how to select the columns for thi
* [`FrameColumn`](DataColumn.md#framecolumn)
* `DataColumn<Collection>`

**Reverse operation:** [`implode`](implode.md)

Exploded columns will change their types:
* `List<T>` to `T`
* [`DataFrame`](DataFrame.md) to [`DataRow`](DataRow.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/fill.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Replace missing values.

**Related operations**: [](updateConvert.md)

## fillNulls

Replaces `null` values with given value or expression.
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Returns [`DataFrame`](DataFrame.md) with rows that satisfy [row condition](DataRow.md#row-conditions)

**Related operations**: [](filterRows.md)

<!---FUN filter-->
<tabs>
<tab title="Properties">
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/flatten.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ flatten [ { columns } ]
Columns will keep their original names after flattening.
Potential column name clashes are resolved by adding minimal possible name prefix from ancestor columns.

**Related operations**: [](groupUngroupFlatten.md)

See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.

<!---FUN flatten-->
Expand Down
2 changes: 1 addition & 1 deletion docs/StardustDocs/topics/group.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ group { columns }
groupNameExpression = DataColumn.(DataColumn) -> String
```

**Reverse operation:** [`ungroup`](ungroup.md)
**Reverse operation:** [`ungroup`](ungroup.md), [`flatten`](flatten.md)

It is a special case of [`move`](move.md) operation.

Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/insert.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Similar to [add](add.md), but supports column positioning.

Create new column based on existing columns and insert it into [`DataFrame`](DataFrame.md):

**Related operations**: [](insertReplace.md)

<!---FUN insert-->
<tabs>
<tab title="Properties">
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/join.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ interface JoinDsl: LeftDataFrame {

`joinColumns` is a [column selector](ColumnSelectors.md) that defines column mapping for join:

Related operations: [](multipleDataFrames.md)

<!---FUN joinWithMatch-->
<tabs>
<tab title="Properties">
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
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
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/merge.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ merge { columns }
merger: (DataRow).List<T> -> Any
```

**Related operations**: [](splitMerge.md)

See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.

<!---FUN merge-->
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/move.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ move { columns }
pathSelector: DataFrame.(DataColumn) -> ColumnPath
```

**Related operations**: [](moveRename.md)

See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.

Can be used to change column hierarchy by providing `ColumnPath` for every moved column.
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/parse.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ This parsing operation is sometimes executed implicitly, for example, when [read
[type converting from `String` columns](convert.md).
You can recognize this by the `locale` or `parserOptions` arguments in these functions.

Related operations: [](updateConvert.md)

<!---FUN parseAll-->

```kotlin
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Returns [`DataFrame`](DataFrame.md) without selected columns.
remove { columns }
```

Related operations: [](addRemove.md)

See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.

<!---FUN remove-->
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/rename.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ df.rename { columns }.into { nameExpression }
nameExpression = (DataColumn) -> String
```

**Related operations**: [](moveRename.md)

See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.

<!---FUN rename-->
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/reorder.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ reorder { columns }
columnExpression: DataColumn.(DataColumn) -> Value
```

**Related operations**: [](moveRename.md)

See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.

<!---FUN reorder-->
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/replace.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ replace { columns }
columnExpression: DataFrame.(DataColumn) -> DataColumn
```

**Related operations**: [](insertReplace.md)

See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.

<!---FUN replace-->
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/reverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Returns [`DataFrame`](DataFrame.md) with rows in reversed order.

**Related operations**: [](reorderRows.md)

<!---FUN reverse-->

```kotlin
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ df.select("age", "weight")
<inline-frame src="resources/org.jetbrains.kotlinx.dataframe.samples.api.Access.select.html" width="100%"/>
<!---END-->

**Related operations**: [remove](remove.md)

See [column selectors](ColumnSelectors.md)
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/shuffle.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Returns [`DataFrame`](DataFrame.md) with randomly reordered rows.

**Related operations**: [](reorderRows.md)

<!---FUN shuffle-->

```kotlin
Expand Down
2 changes: 2 additions & 0 deletions docs/StardustDocs/topics/sortBy.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ By default, columns are sorted in ascending order with `null` values going first
* `.desc` — changes column sort order from ascending to descending
* `.nullsLast` — forces `null` values to be placed at the end of the order

**Related operations**: [](reorderRows.md)

See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.

<!---FUN sortBy-->
Expand Down
Loading
Loading