Skip to content

Commit 58f0aa3

Browse files
committed
added nan/na doc file
1 parent dcaf2d4 commit 58f0aa3

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

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/NanAndNa.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[//]: # (title: NaN and NA)
2+
3+
Using the Kotlin DataFrame library, you might come across the terms `NaN` and `NA`.
4+
This page explains what they mean and how to work with them.
5+
6+
## NaN
7+
8+
`Float` or `Double` values can be represented as `NaN`,
9+
in cases where a mathematical operation is undefined, such as for dividing by zero. The
10+
result of such an operation can only be described as "**N**ot **a** **N**umber".
11+
12+
This is different from `null`, which means that a value is missing and, in Kotlin, can only occur
13+
for `Float?` and `Double?` types.
14+
15+
16+
You can use [fillNaNs](fill.md#fillnans) to replace `NaNs` in certain columns with a given value or expression
17+
or [dropNaNs](drop.md#dropnans) to drop rows with `NaNs` in them.
18+
19+
## NA
20+
21+
`NA` in Dataframe can be seen as: [`NaN`](#nan) or `null`. Which is another way to say that the value
22+
is "**N**ot **A**vailable".
23+
24+
You can use [fillNA](fill.md#fillna) to replace `NAs` in certain columns with a given value or expression
25+
or [dropNA](drop.md#dropna) to drop rows with `NAs` in them.

0 commit comments

Comments
 (0)