Skip to content

Commit e6ab95b

Browse files
committed
fixing some review issues
1 parent f0e8c13 commit e6ab95b

File tree

19 files changed

+162
-135
lines changed

19 files changed

+162
-135
lines changed

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ import kotlin.reflect.typeOf
2424
/**
2525
* Referring to a column in the selection DSL can be done in several ways corresponding to all
2626
* [Access APIs][AccessApi]:
27-
* TODO
27+
* TODO: [Issue #286](https://github.com/Kotlin/dataframe/issues/286)
2828
*/
2929
private interface CommonColumnSelectionExamples
3030

3131
/** [Column Selection DSL][ColumnSelectionDsl] */
3232
internal interface ColumnSelectionDslLink
3333

34-
/** TODO: Put examples and explanations here */
34+
/** TODO: [Issue #286](https://github.com/Kotlin/dataframe/issues/286) */
3535
public interface ColumnSelectionDsl<out T> : ColumnsContainer<T> {
3636

3737
public operator fun <C> ColumnReference<C>.invoke(): DataColumn<C> = get(this)
@@ -50,7 +50,7 @@ public interface ColumnSelectionDsl<out T> : ColumnsContainer<T> {
5050
/** [Columns Selection DSL][ColumnsSelectionDsl] */
5151
internal interface ColumnsSelectionDslLink
5252

53-
/** TODO: Put examples and explanations here */
53+
/** TODO: [Issue #286](https://github.com/Kotlin/dataframe/issues/286) */
5454
public interface ColumnsSelectionDsl<out T> : ColumnSelectionDsl<T>, SingleColumn<DataRow<T>> {
5555

5656
public fun <C> ColumnSet<C>.first(condition: ColumnFilter<C>): SingleColumn<C> =

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/Nulls.kt

Lines changed: 58 additions & 71 deletions
Large diffs are not rendered by default.

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/update.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public fun <T, C> DataFrame<T>.update(vararg columns: ColumnReference<C>): Updat
217217
update { columns.toColumns() }
218218

219219
/**
220-
* TODO this will be deprecated
220+
* TODO this will be deprecated [PR #286](https://github.com/Kotlin/dataframe/pull/320)
221221
*/
222222
public fun <T, C> DataFrame<T>.update(columns: Iterable<ColumnReference<C>>): Update<T, C> =
223223
update { columns.toColumnSet() }

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,4 @@ internal interface AccessApi {
135135
}
136136

137137
/** [Access API][AccessApi] */
138-
internal interface AccessApiLink
138+
public const val AccessApiLink: Int = 0

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ import org.jetbrains.kotlinx.dataframe.RowValueExpression as DfRowValueExpressio
2020
* for instance in [update.with][Update.with], and [convert.notNull][Convert.notNull]
2121
* (using [RowValueExpression][DfRowValueExpression]).
2222
*
23-
* Note:
23+
* NOTE:
2424
*
2525
* [update with][org.jetbrains.kotlinx.dataframe.api.Update.with]- and [add][org.jetbrains.kotlinx.dataframe.api.add]-like expressions use [AddDataRow][org.jetbrains.kotlinx.dataframe.api.AddDataRow] instead of [DataRow][org.jetbrains.kotlinx.dataframe.DataRow] as the DSL's receiver type.
2626
* This is an extension to [RowValueExpression][org.jetbrains.kotlinx.dataframe.RowValueExpression] and
2727
* [RowExpression][org.jetbrains.kotlinx.dataframe.RowExpression] that provides access to
2828
* the modified/generated value of the preceding row ([AddDataRow.newValue][org.jetbrains.kotlinx.dataframe.api.AddDataRow.newValue]).
2929
*
30-
* A Row Expression is similar to a [Row Condition][org.jetbrains.kotlinx.dataframe.documentation.SelectingRows] but that expects a [Boolean][Boolean] as result.
30+
* A [Row Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRow.RowExpression.WithExample] is similar to a [Row Condition][org.jetbrains.kotlinx.dataframe.documentation.SelectingRows] but that expects a [Boolean][Boolean] as result.
3131
*/
3232
internal interface ExpressionsGivenRow {
3333

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package org.jetbrains.kotlinx.dataframe.documentation
2+
3+
import org.jetbrains.kotlinx.dataframe.api.dropNA
4+
import org.jetbrains.kotlinx.dataframe.api.fillNA
5+
6+
/**
7+
* ## `NA`
8+
* `NA` in Dataframe can be seen as "[NaN] or `null`".
9+
*
10+
* [Floats][Float] or [Doubles][Double] can be represented as [Float.NaN] or [Double.NaN], respectively,
11+
* in cases where a mathematical operation is undefined, such as dividing by zero.
12+
*
13+
* You can also use [fillNA][fillNA] to replace `NAs` in certain columns with a given value or expression
14+
* or [dropNA][dropNA] to drop rows with `NAs` in them.
15+
*
16+
* @see NaN
17+
*/
18+
internal interface NA
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package org.jetbrains.kotlinx.dataframe.documentation
2+
3+
import org.jetbrains.kotlinx.dataframe.api.dropNaNs
4+
import org.jetbrains.kotlinx.dataframe.api.fillNaNs
5+
6+
/**
7+
* ## `NaN`
8+
* [Floats][Float] or [Doubles][Double] can be represented as [Float.NaN] or [Double.NaN], respectively,
9+
* in cases where a mathematical operation is undefined, such as dividing by zero.
10+
*
11+
* You can also use [fillNaNs][fillNaNs] to replace `NaNs` in certain columns with a given value or expression
12+
* or [dropNaNs][dropNaNs] to drop rows with `NaNs` in them.
13+
*
14+
* @see NA
15+
*/
16+
internal interface NaN

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ import org.jetbrains.kotlinx.dataframe.columns.SingleColumn
1010
import org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.*
1111
import kotlin.reflect.KProperty
1212

13-
/** {@comment
14-
* In this file we provide documentation for high-level operations such as
15-
* the operation of selecting columns.
16-
* }
17-
*/
18-
1913
/** [Selecting Columns][SelectingColumns] */
2014
internal interface SelectingColumnsLink
2115

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
package org.jetbrains.kotlinx.dataframe.documentation
22

3-
import org.jetbrains.kotlinx.dataframe.*
3+
import org.jetbrains.kotlinx.dataframe.RowFilter
4+
import org.jetbrains.kotlinx.dataframe.RowValueFilter
45
import org.jetbrains.kotlinx.dataframe.api.*
6+
import org.jetbrains.kotlinx.dataframe.documentation.SelectingRows.RowConditionLink
7+
import org.jetbrains.kotlinx.dataframe.documentation.SelectingRows.RowValueConditionLink
8+
import org.jetbrains.kotlinx.dataframe.index
59

610
/**
711
* ## Selecting Rows
@@ -14,7 +18,6 @@ import org.jetbrains.kotlinx.dataframe.api.*
1418
* (using [RowValueFilter]).
1519
*
1620
* A Row Condition is similar to a [Row Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRow] but expects a [Boolean] as result.
17-
*
1821
*/
1922
internal interface SelectingRows {
2023

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ import kotlin.reflect.typeOf
2424
/**
2525
* Referring to a column in the selection DSL can be done in several ways corresponding to all
2626
* [Access APIs][AccessApi]:
27-
* TODO
27+
* TODO: [Issue #286](https://github.com/Kotlin/dataframe/issues/286)
2828
*/
2929
private interface CommonColumnSelectionExamples
3030

3131
/** [Column Selection DSL][ColumnSelectionDsl] */
3232
internal interface ColumnSelectionDslLink
3333

34-
/** TODO: Put examples and explanations here */
34+
/** TODO: [Issue #286](https://github.com/Kotlin/dataframe/issues/286) */
3535
public interface ColumnSelectionDsl<out T> : ColumnsContainer<T> {
3636

3737
public operator fun <C> ColumnReference<C>.invoke(): DataColumn<C> = get(this)
@@ -50,7 +50,7 @@ public interface ColumnSelectionDsl<out T> : ColumnsContainer<T> {
5050
/** [Columns Selection DSL][ColumnsSelectionDsl] */
5151
internal interface ColumnsSelectionDslLink
5252

53-
/** TODO: Put examples and explanations here */
53+
/** TODO: [Issue #286](https://github.com/Kotlin/dataframe/issues/286) */
5454
public interface ColumnsSelectionDsl<out T> : ColumnSelectionDsl<T>, SingleColumn<DataRow<T>> {
5555

5656
public fun <C> ColumnSet<C>.first(condition: ColumnFilter<C>): SingleColumn<C> =

0 commit comments

Comments
 (0)