Skip to content

Commit b542198

Browse files
authored
Merge pull request #411 from Kotlin/na-and-nan-docs
NA and NaN docs
2 parents 9fb46fe + aacf673 commit b542198

File tree

15 files changed

+64
-10
lines changed

15 files changed

+64
-10
lines changed

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/DocumentationUrls.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ internal interface DocumentationUrls {
1919
interface RowConditions
2020
}
2121

22+
/** [See `NaN` and `NA` on the documentation website.](https://kotlin.github.io/dataframe/nanAndNa.html) */
23+
interface NanAndNa {
24+
25+
/** [See `NaN` on the documentation website.](https://kotlin.github.io/dataframe/nanAndNa.html#nan) */
26+
interface NaN
27+
28+
/** [See `NA` on the documentation website.](https://kotlin.github.io/dataframe/nanAndNa.html#na) */
29+
interface NA
30+
}
31+
2232
/** [See `update` on the documentation website.](https://kotlin.github.io/dataframe/update.html) */
2333
interface Update
2434

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/NA.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import org.jetbrains.kotlinx.dataframe.api.fillNA
1313
* You can also use [fillNA][fillNA] to replace `NAs` in certain columns with a given value or expression
1414
* or [dropNA][dropNA] to drop rows with `NAs` in them.
1515
*
16+
* For more information: [See `NA` on the documentation website.](https://kotlin.github.io/dataframe/nanAndNa.html#na)
17+
*
1618
* @see NaN
1719
*/
1820
internal interface NA

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/NaN.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import org.jetbrains.kotlinx.dataframe.api.fillNaNs
1111
* You can also use [fillNaNs][fillNaNs] to replace `NaNs` in certain columns with a given value or expression
1212
* or [dropNaNs][dropNaNs] to drop rows with `NaNs` in them.
1313
*
14+
* For more information: [See `NaN` on the documentation website.](https://kotlin.github.io/dataframe/nanAndNa.html#nan)
15+
*
1416
* @see NA
1517
*/
1618
internal interface NaN

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/DocumentationUrls.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ internal interface DocumentationUrls {
1919
interface RowConditions
2020
}
2121

22+
/** [{@include [Text]}{@arg [NameArg] `NaN` and `NA`}]({@include [Url]}/nanAndNa.html) */
23+
interface NanAndNa {
24+
25+
/** [{@include [Text]}{@arg [NameArg] `NaN`}]({@include [Url]}/nanAndNa.html#nan) */
26+
interface NaN
27+
28+
/** [{@include [Text]}{@arg [NameArg] `NA`}]({@include [Url]}/nanAndNa.html#na) */
29+
interface NA
30+
}
31+
2232
/** [{@include [Text]}{@arg [NameArg] `update`}]({@include [Url]}/update.html) */
2333
interface Update
2434

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/NA.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import org.jetbrains.kotlinx.dataframe.api.fillNA
1313
* You can also use [fillNA][fillNA] to replace `NAs` in certain columns with a given value or expression
1414
* or [dropNA][dropNA] to drop rows with `NAs` in them.
1515
*
16+
* For more information: {@include [DocumentationUrls.NanAndNa.NA]}
17+
*
1618
* @see NaN
1719
*/
1820
internal interface NA

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/NaN.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import org.jetbrains.kotlinx.dataframe.api.fillNaNs
1111
* You can also use [fillNaNs][fillNaNs] to replace `NaNs` in certain columns with a given value or expression
1212
* or [dropNaNs][dropNaNs] to drop rows with `NaNs` in them.
1313
*
14+
* For more information: {@include [DocumentationUrls.NanAndNa.NaN]}
15+
*
1416
* @see NA
1517
*/
1618
internal interface NaN

docs/StardustDocs/d.tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
<toc-element topic="DataColumn.md"/>
3636
<toc-element topic="DataRow.md"/>
3737
</toc-element>
38+
<toc-element topic="nanAndNa.md"/>
3839
<toc-element topic="operations.md"/>
3940
<toc-element toc-title="Operations">
4041
<toc-element topic="create.md">

docs/StardustDocs/topics/cumSum.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ cumSum(skipNA = true) [ { columns } ]
1111
Returns a [`DataFrame`](DataFrame.md) or [`DataColumn`](DataColumn.md) containing the cumulative sum.
1212

1313
**Parameters:**
14-
* `skipNA` — when `true`, ignores `NA` (`null` or `NaN`) values.
14+
* `skipNA` — when `true`, ignores [`NA` values](nanAndNa.md#na) (`null` or `NaN`).
1515
When `false`, all values after first `NA` will be `NaN` (for `Double` and `Float` columns) or `null` (for integer columns).
1616

1717
**Available for:**

docs/StardustDocs/topics/drop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ df.dropNulls(whereAllNull = true) { city and weight } // remove rows with null v
5555

5656
## dropNaNs
5757

58-
Remove rows with `Double.NaN` or `Float.NaN` values
58+
Remove rows with [`NaN` values](nanAndNa.md#nan) (`Double.NaN` or `Float.NaN`).
5959

6060
<!---FUN dropNaNs-->
6161

@@ -72,7 +72,7 @@ df.dropNaNs(whereAllNaN = true) { age and weight } // remove rows where both 'ag
7272

7373
## dropNA
7474

75-
Remove rows with `null`, `Double.NaN` or `Float.NaN` values
75+
Remove rows with [`NA` values](nanAndNa.md#na) (`null`, `Double.NaN`, or `Float.NaN`).
7676

7777
<!---FUN dropNA-->
7878

docs/StardustDocs/topics/fill.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ df.update { colsOf<Int?>() }.where { it == null }.with { -1 }
2121

2222
## fillNaNs
2323

24-
Replaces `Double.NaN` and `Float.NaN` values with given value or expression.
24+
Replaces [`NaN` values](nanAndNa.md#nan) (`Double.NaN` and `Float.NaN`) with given value or expression.
2525

2626
<!---FUN fillNaNs-->
2727

@@ -34,7 +34,7 @@ df.fillNaNs { colsOf<Double>() }.withZero()
3434

3535
## fillNA
3636

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

3939
<!---FUN fillNA-->
4040

0 commit comments

Comments
 (0)