Skip to content

Commit 143e341

Browse files
committed
done up until c
1 parent 199f8e1 commit 143e341

File tree

9 files changed

+59
-44
lines changed

9 files changed

+59
-44
lines changed

docs/StardustDocs/topics/concat.md

Lines changed: 6 additions & 5 deletions
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) with the union of rows from several given [`DataFrames`](DataFrame.md).
5+
Returns a [`DataFrame`](DataFrame.md) with the union of rows from several given [`DataFrames`](DataFrame.md).
66

77
`concat` is available for:
88

@@ -91,13 +91,14 @@ frameColumn.concat()
9191

9292
<!---END-->
9393

94-
If you want to union columns (not rows) from several [`DataFrames`](DataFrame.md), see [`add`](add.md).
94+
If you want to take the union of columns (not rows) from several [`DataFrames`](DataFrame.md), see [`add`](add.md).
9595

9696
## Schema unification
9797

98-
If input [`DataFrames`](DataFrame.md) have different schemas, every column in resulting [`DataFrames`](DataFrame.md) will have the most common type of the original columns with the same name.
98+
If input [`DataFrames`](DataFrame.md) have different schemas, every column in the resulting [`DataFrames`](DataFrame.md)
99+
will get the lowest common type of the original columns with the same name.
99100

100-
For example, if one [`DataFrame`](DataFrame.md) has column `A: Int` and other [`DataFrame`](DataFrame.md) has column `A: Double`,
101-
the resulting ` DataFrame ` will have column `A: Number`.
101+
For example, if one [`DataFrame`](DataFrame.md) has a column `A: Int` and another [`DataFrame`](DataFrame.md) has a column `A: Double`,
102+
the resulting ` DataFrame ` will have a column `A: Number`.
102103

103104
Missing columns in dataframes will be filled with `null`.

docs/StardustDocs/topics/convert.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ df.convert { weight }.toFloat()
4949
<dataFrame src="org.jetbrains.kotlinx.dataframe.samples.api.Modify.convertTo.html"/>
5050
<!---END-->
5151

52-
Automatic conversion from `String` into enum class is also supported:
52+
Automatic conversion from `String` to enum classes is also supported:
5353

5454
```kotlin
5555
enum class Direction { NORTH, SOUTH, WEST, EAST }

docs/StardustDocs/topics/convertTo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[//]: # (title: convertTo)
22
<!---IMPORT org.jetbrains.kotlinx.dataframe.samples.api.Modify-->
33

4-
[Converts](convert.md) columns in [`DataFrame`](DataFrame.md) to match given schema [`Schema`](schema.md).
4+
[Converts](convert.md) columns in [`DataFrame`](DataFrame.md) to match a given schema [`Schema`](schema.md).
55

66
```kotlin
77
convertTo<Schema>(excessiveColumns = ExcessiveColumns.Keep)

docs/StardustDocs/topics/corr.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
11
[//]: # (title: corr)
22

3-
Returns [`DataFrame`](DataFrame.md) with pairwise correlation between two sets of columns.
3+
Returns [`DataFrame`](DataFrame.md) with the pairwise correlation between two sets of columns.
44

5-
Computes Pearson correlation coefficient.
5+
It computes the [Pearson correlation coefficient](https://en.wikipedia.org/wiki/Pearson_correlation_coefficient).
66

77
```kotlin
88
corr { columns1 }
99
.with { columns2 } | .withItself()
1010
```
1111

12-
To compute pairwise correlation between all columns in [`DataFrame`](DataFrame.md) use `corr` without arguments:
12+
To compute pairwise correlation between all columns in the [`DataFrame`](DataFrame.md) use `corr` without arguments:
1313

1414
```kotlin
1515
corr()
1616
```
1717

18-
Available for numeric and `Boolean` columns. `Boolean` values are converted into `1` for `true` and `0` for `false`. All other columns are ignored.
18+
The function is available for numeric- and `Boolean` columns.
19+
`Boolean` values are converted into `1` for `true` and `0` for `false`.
20+
All other columns are ignored.
1921

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

22-
Resulting [`DataFrame`](DataFrame.md) will have `n1` rows and `n2+1` columns, where `n1` and `n2` are numbers of columns in `columns1` and `columns2` correspondingly.
25+
The resulting [`DataFrame`](DataFrame.md) will have `n1` rows and `n2+1` columns,
26+
where `n1` and `n2` are the number of columns in `columns1` and `columns2` correspondingly.
2327

24-
The first column will have the name "column" and will contain names of columns in `column1`. Other columns will have the same names as in `columns2` and will contain computed correlation coefficients.
28+
The first column will have the name "column" and will contain names of columns in `column1`.
29+
Other columns will have the same names as in `columns2` and will contain the computed correlation coefficients.
2530

26-
If exactly one [`ColumnGroup`](DataColumn.md#columngroup) is passed in `columns1`, the first column in output will have its name.
31+
If exactly one [`ColumnGroup`](DataColumn.md#columngroup) is passed in `columns1`,
32+
the first column in the output will have its name.

docs/StardustDocs/topics/count.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ df.count()
1212

1313
<!---END-->
1414

15-
Pass [row condition](DataRow.md#row-conditions) to count the number of rows that satisfy that condition:
15+
Pass a [row condition](DataRow.md#row-conditions) to count only the number of rows that satisfy that condition:
1616

1717
<!---FUN countCondition-->
1818

@@ -22,7 +22,8 @@ df.count { age > 15 }
2222

2323
<!---END-->
2424

25-
When `count` is used in [`groupBy`](groupBy.md#aggregation) or [`pivot`](pivot.md#aggregation) aggregations, it counts rows for every data group:
25+
When `count` is used in [`groupBy`](groupBy.md#aggregation) or [`pivot`](pivot.md#aggregation) aggregations,
26+
it counts rows for every data group:
2627

2728
<!---FUN countAggregation-->
2829

docs/StardustDocs/topics/create.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<show-structure depth="3"/>
33
<!---IMPORT org.jetbrains.kotlinx.dataframe.samples.api.Create-->
44

5-
There are several ways to create [`dataframes`](DataFrame.md) from the data that is already loaded into memory:
6-
* [create columns with data](createColumn.md) and then [bundle them](createDataFrame.md) into [`DataFrame`](DataFrame.md)
7-
* create and initialize [`DataFrame`](DataFrame.md) directly from values using `vararg` variants of the [corresponding functions](createDataFrame.md) .
5+
There are several ways to create [`dataframes`](DataFrame.md) from data that is already loaded into memory:
6+
* [create columns with data](createColumn.md) and then [bundle them](createDataFrame.md) into a [`DataFrame`](DataFrame.md)
7+
* create and initialize [`DataFrame`](DataFrame.md) directly from values using `vararg` variants of the [corresponding functions](createDataFrame.md).
88
* [convert Kotlin objects](createDataFrame.md#todataframe) into [`DataFrame`](DataFrame.md)
99

10-
To learn how to read dataframes from files and URLs, go to [the next section](read.md).
10+
To learn how to read [`dataframes`](DataFrame.md) from files and URLs, go to the [next section](read.md).

docs/StardustDocs/topics/createColumn.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[//]: # (title: Create DataColumn)
22
<!---IMPORT org.jetbrains.kotlinx.dataframe.samples.api.Create-->
33

4-
This section describes ways to create [`DataColumn`](DataColumn.md).
4+
This section describes ways to create a [`DataColumn`](DataColumn.md).
55

66
### columnOf
77

8-
Returns new column with given elements.
9-
Column [`type`](DataColumn.md#properties) is deduced from a compile-time type of elements,
10-
column [`name`](DataColumn.md#properties) is taken from the name of the variable.
8+
Returns new column with the given elements.
9+
The column [`type`](DataColumn.md#properties) is deduced from the compile-time type of the elements inside.
10+
The column [`name`](DataColumn.md#properties) is taken from the name of the variable.
1111

1212
<!---FUN createValueByColumnOf-->
1313

@@ -18,7 +18,7 @@ val student by columnOf("Alice", "Bob")
1818

1919
<!---END-->
2020

21-
To assign column name explicitly, use `named` infix function and replace `by` with `=`.
21+
To assign column name explicitly, use the `named` infix function and replace `by` with `=`.
2222

2323
<!---FUN createColumnRenamed-->
2424

@@ -28,7 +28,7 @@ val column = columnOf("Alice", "Bob") named "student"
2828

2929
<!---END-->
3030

31-
When column elements are columns themselves, it returns [`ColumnGroup`](DataColumn.md#columngroup):
31+
When column elements are columns themselves, it returns a [`ColumnGroup`](DataColumn.md#columngroup):
3232

3333
<!---FUN createColumnGroup-->
3434

@@ -42,7 +42,7 @@ val fullName by columnOf(firstName, lastName)
4242

4343
<!---END-->
4444

45-
When column elements are [`DataFrames`](DataFrame.md) it returns [`FrameColumn`](DataColumn.md#framecolumn):
45+
When column elements are [`DataFrames`](DataFrame.md) it returns a [`FrameColumn`](DataColumn.md#framecolumn):
4646

4747
<!---FUN createFrameColumn-->
4848

@@ -58,7 +58,7 @@ val frames by columnOf(df1, df2)
5858

5959
### toColumn
6060

61-
Converts `Iterable` of values into column.
61+
Converts an `Iterable` of values into a column.
6262

6363
<!---FUN createValueByToColumn-->
6464

@@ -68,9 +68,9 @@ listOf("Alice", "Bob").toColumn("name")
6868

6969
<!---END-->
7070

71-
To compute a column type at runtime by scanning through actual values, set `Infer.Type` option.
71+
To compute a column type at runtime by scanning through the actual values, enable the `Infer.Type` option.
7272

73-
To inspect values only for a nullability set `Infer.Nulls` an option.
73+
To inspect values only for nullability, enable the `Infer.Nulls` option.
7474

7575
<!---FUN createValueColumnInferred-->
7676

@@ -86,7 +86,8 @@ values.toColumn("data", Infer.Nulls) // type: Any
8686

8787
### toColumnOf
8888

89-
Converts [`Iterable`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/) of values into column of a given type
89+
Converts an [`Iterable`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/)
90+
of values into a column of a given type:
9091

9192
<!---FUN createValueColumnOfType-->
9293

docs/StardustDocs/topics/createDataFrame.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[//]: # (title: Create DataFrame)
22
<!---IMPORT org.jetbrains.kotlinx.dataframe.samples.api.Create-->
33

4-
This section describes ways to create [`DataFrame`](DataFrame.md).
4+
This section describes ways to create a [`DataFrame`](DataFrame.md) instance.
55

66
### emptyDataFrame
77

8-
Returns [`DataFrame`](DataFrame.md) with no rows and no columns.
8+
Returns a [`DataFrame`](DataFrame.md) with no rows and no columns.
99

1010
<!---FUN createEmptyDataFrame-->
1111

@@ -17,7 +17,7 @@ val df = emptyDataFrame<Any>()
1717

1818
### dataFrameOf
1919

20-
Returns [`DataFrame`](DataFrame.md) with given column names and values.
20+
Returns a [`DataFrame`](DataFrame.md) with given column names and values.
2121

2222
<!---FUN createDataFrameOf-->
2323

@@ -108,7 +108,7 @@ val df = dataFrameOf(names).fill(15, true)
108108

109109
### toDataFrame
110110

111-
[`DataFrame`](DataFrame.md) from `Iterable<DataColumn>`:
111+
Creates a [`DataFrame`](DataFrame.md) from an `Iterable<DataColumn>`:
112112

113113
<!---FUN createDataFrameFromIterable-->
114114

@@ -134,9 +134,10 @@ map.toDataFrame()
134134

135135
<!---END-->
136136

137-
[`DataFrame`](DataFrame.md) from [`Iterable`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/) of [basic types](https://kotlinlang.org/docs/basic-types.html) (except arrays):
137+
Creates a [`DataFrame`](DataFrame.md) from an [`Iterable`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/) of [basic types](https://kotlinlang.org/docs/basic-types.html) (except arrays):
138138

139-
The return type of these overloads is a typed DataFrame. Its data schema defines column that can be used right after conversion for additional computations
139+
The return type of these overloads is a typed [`DataFrame`](DataFrame.md).
140+
Its data schema defines the column that can be used right after the conversion for additional computations.
140141

141142
<!---FUN readDataFrameFromValues-->
142143

@@ -148,7 +149,7 @@ df.add("length") { value.length }
148149

149150
<!---END-->
150151

151-
[`DataFrame`](DataFrame.md) from [`Iterable`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/) of objects:
152+
Creates a [`DataFrame`](DataFrame.md) from an [`Iterable`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/) of objects:
152153

153154
<!---FUN readDataFrameFromObject-->
154155

@@ -163,9 +164,11 @@ val df = persons.toDataFrame()
163164
<!---END-->
164165

165166
Scans object properties using reflection and creates a [ValueColumn](DataColumn.md#valuecolumn) for every property.
166-
Scope of properties for scanning is defined at compile-time by formal types of objects in [`Iterable`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/), so properties of implementation classes will not be scanned.
167+
The scope of properties for scanning is defined at compile-time by the formal types of the objects in the [`Iterable`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/),
168+
so the properties of implementation classes will not be scanned.
167169

168-
Specify `depth` parameter to perform deep object graph traversal and convert nested objects into [ColumnGroups](DataColumn.md#columngroup) and [FrameColumns](DataColumn.md#framecolumn):
170+
Specify the `depth` parameter to perform deep object graph traversal
171+
and convert nested objects into [ColumnGroups](DataColumn.md#columngroup) and [FrameColumns](DataColumn.md#framecolumn):
169172

170173
<!---FUN readDataFrameFromDeepObject-->
171174

@@ -184,7 +187,9 @@ val df = students.toDataFrame(maxDepth = 1)
184187

185188
<!---END-->
186189

187-
For detailed control over object graph transformation, use configuration DSL. It allows you to exclude particular properties or classes from object graph traversal, compute additional columns and configure column grouping.
190+
For detailed control over object graph transformations, use the configuration DSL.
191+
It allows you to exclude particular properties or classes from the object graph traversal,
192+
compute additional columns, and configure column grouping.
188193

189194
<!---FUN readDataFrameFromDeepObjectWithExclude-->
190195

docs/StardustDocs/topics/cumSum.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

5-
Computes a cumulative sum of values in selected columns.
5+
Computes the cumulative sum of values in the selected columns.
66

77
```text
88
cumSum(skipNA = true) [ { columns } ]
@@ -11,7 +11,8 @@ 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. When `false`, all values after first `NA` will be `NaN` (for `Double` and `Float` columns) or `null` (for integer columns).
14+
* `skipNA` — when `true`, ignores `NA` (`null` or `NaN`) values.
15+
When `false`, all values after first `NA` will be `NaN` (for `Double` and `Float` columns) or `null` (for integer columns).
1516

1617
**Available for:**
1718
* [`DataFrame`](DataFrame.md)

0 commit comments

Comments
 (0)