Skip to content

Commit d9c884d

Browse files
committed
updating docs to provide links to column selectors from everywhere we mention selecting columns for operations
1 parent 5f5f6a1 commit d9c884d

37 files changed

+99
-31
lines changed

docs/StardustDocs/topics/add.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<!---IMPORT org.jetbrains.kotlinx.dataframe.samples.api.Modify-->
44

5-
Returns [`DataFrame`](DataFrame.md) which contains all columns from original [`DataFrame`](DataFrame.md) followed by newly added columns.
5+
Returns [`DataFrame`](DataFrame.md) which contains all columns from the original [`DataFrame`](DataFrame.md) followed by newly added columns.
66
Original [`DataFrame`](DataFrame.md) is not modified.
77

88
`add` appends columns to the end of the dataframe by default.

docs/StardustDocs/topics/convert.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ colExpression = DataFrame.(DataColumn) -> DataColumn
1313
frameExpression: DataFrame.(DataFrame) -> DataFrame
1414
```
1515

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

1819
<!---FUN convert-->
1920

docs/StardustDocs/topics/corr.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ corr { columns1 }
99
.with { columns2 } | .withItself()
1010
```
1111

12+
See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.
13+
1214
To compute pairwise correlation between all columns in the [`DataFrame`](DataFrame.md) use `corr` without arguments:
1315

1416
```kotlin
@@ -19,7 +21,7 @@ The function is available for numeric- and `Boolean` columns.
1921
`Boolean` values are converted into `1` for `true` and `0` for `false`.
2022
All other columns are ignored.
2123

22-
If a [`ColumnGroup`](DataColumn.md#columngroup) instance is passed as target column for correlation,
24+
If a [`ColumnGroup`](DataColumn.md#columngroup) instance is passed as the target column for correlation,
2325
it will be unpacked into suitable nested columns.
2426

2527
The resulting [`DataFrame`](DataFrame.md) will have `n1` rows and `n2+1` columns,

docs/StardustDocs/topics/cumSum.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ cumSum(skipNA = true) [ { columns } ]
1010

1111
Returns a [`DataFrame`](DataFrame.md) or [`DataColumn`](DataColumn.md) containing the cumulative sum.
1212

13+
See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.
14+
1315
**Parameters:**
1416
* `skipNA` — when `true`, ignores [`NA` values](nanAndNa.md#na) (`null` or `NaN`).
1517
When `false`, all values after first `NA` will be `NaN` (for `Double` and `Float` columns) or `null` (for integer columns).

docs/StardustDocs/topics/distinct.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ df.distinct()
1616

1717
If columns are specified, resulting [`DataFrame`](DataFrame.md) will have only given columns with distinct values.
1818

19+
See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.
20+
1921
<!---FUN distinctColumns-->
2022
<tabs>
2123
<tab title="Properties">
@@ -43,6 +45,8 @@ df.select("age", "name").distinct()
4345

4446
Keep only the first row for every group of rows grouped by some condition.
4547

48+
See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.
49+
4650
<!---FUN distinctBy-->
4751
<tabs>
4852
<tab title="Properties">

docs/StardustDocs/topics/drop.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ df.drop { it["weight"] == null || it["city"] == null }
2727

2828
Remove rows with `null` values
2929

30+
See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.
31+
3032
<!---FUN dropNulls-->
3133

3234
```kotlin
@@ -44,6 +46,8 @@ df.dropNulls(whereAllNull = true) { city and weight } // remove rows with null v
4446

4547
Remove rows with [`NaN` values](nanAndNa.md#nan) (`Double.NaN` or `Float.NaN`).
4648

49+
See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.
50+
4751
<!---FUN dropNaNs-->
4852

4953
```kotlin
@@ -61,6 +65,8 @@ df.dropNaNs(whereAllNaN = true) { age and weight } // remove rows where both 'ag
6165

6266
Remove rows with [`NA` values](nanAndNa.md#na) (`null`, `Double.NaN`, or `Float.NaN`).
6367

68+
See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.
69+
6470
<!---FUN dropNA-->
6571

6672
```kotlin

docs/StardustDocs/topics/explode.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Splits list-like values in given columns and spreads them vertically. Values in
88
explode(dropEmpty = true) [ { columns } ]
99
```
1010

11+
See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.
12+
1113
**Parameters:**
1214
* `dropEmpty` — if `true`, removes rows with empty lists or [`DataFrame`](DataFrame.md) objects. Otherwise, they will be exploded into `null`.
1315

docs/StardustDocs/topics/fill.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Replace missing values.
88

99
Replaces `null` values with given value or expression.
1010

11+
See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.
12+
1113
<!---FUN fillNulls-->
1214

1315
```kotlin
@@ -23,6 +25,8 @@ df.update { colsOf<Int?>() }.where { it == null }.with { -1 }
2325

2426
Replaces [`NaN` values](nanAndNa.md#nan) (`Double.NaN` and `Float.NaN`) with given value or expression.
2527

28+
See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.
29+
2630
<!---FUN fillNaNs-->
2731

2832
```kotlin
@@ -36,6 +40,8 @@ df.fillNaNs { colsOf<Double>() }.withZero()
3640

3741
Replaces [`NA` values](nanAndNa.md#na) (`null`, `Double.NaN`, and `Float.NaN`) with given value or expression.
3842

43+
See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.
44+
3945
<!---FUN fillNA-->
4046

4147
```kotlin

docs/StardustDocs/topics/filter.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ df.filter { "age"<Int>() > 18 && "name"["firstName"]<String>().startsWith("A") }
2525

2626
## filterBy
2727

28-
Returns [`DataFrame`](DataFrame.md) with rows that have value `true` in given column of type `Boolean`.
28+
Returns [`DataFrame`](DataFrame.md) with rows that have value `true` in the given column of type `Boolean`.
29+
30+
See [column selectors](ColumnSelectors.md) for how to select the column for this operation.
2931

3032
<!---FUN filterBy-->
3133
<tabs>

docs/StardustDocs/topics/flatten.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ Returns [`DataFrame`](DataFrame.md) without column groupings under selected colu
88
flatten [ { columns } ]
99
```
1010

11-
Columns after flattening will keep their original names. Potential column name clashes are resolved by adding minimal possible name prefix from ancestor columns.
11+
Columns will keep their original names after flattening.
12+
Potential column name clashes are resolved by adding minimal possible name prefix from ancestor columns.
13+
14+
See [column selectors](ColumnSelectors.md) for how to select the columns for this operation.
1215

1316
<!---FUN flatten-->
1417
<tabs>

0 commit comments

Comments
 (0)