Skip to content

Commit 490ecdd

Browse files
committed
docs for dropNulls
1 parent d289e86 commit 490ecdd

File tree

11 files changed

+425
-126
lines changed

11 files changed

+425
-126
lines changed

core/build.gradle.kts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import nl.jolanrensen.docProcessor.defaultProcessors.COMMENT_DOC_PROCESSOR
2-
import nl.jolanrensen.docProcessor.defaultProcessors.INCLUDE_ARG_DOC_PROCESSOR
3-
import nl.jolanrensen.docProcessor.defaultProcessors.INCLUDE_DOC_PROCESSOR
4-
import nl.jolanrensen.docProcessor.defaultProcessors.INCLUDE_FILE_DOC_PROCESSOR
5-
import nl.jolanrensen.docProcessor.defaultProcessors.SAMPLE_DOC_PROCESSOR
1+
import nl.jolanrensen.docProcessor.defaultProcessors.*
62
import nl.jolanrensen.docProcessor.gradle.creatingProcessDocTask
73
import org.gradle.jvm.tasks.Jar
84

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

Lines changed: 217 additions & 49 deletions
Large diffs are not rendered by default.

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

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private interface UpdateWithNote
124124
*
125125
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { `[cols][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.cols]`(1..5) }`
126126
*
127-
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { `[colsOf][org.jetbrains.kotlinx.dataframe.api.colsOf]`<Double>() }`
127+
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { `[colsOf][org.jetbrains.kotlinx.dataframe.api.colsOf]`<`[Double][Double]`>() }`
128128
*
129129
* @param columns The [Columns selector DSL][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.Dsl.WithExample] used to select the columns of this [DataFrame][org.jetbrains.kotlinx.dataframe.DataFrame] to update.
130130
*/
@@ -202,9 +202,9 @@ public fun <T, C> DataFrame<T>.update(vararg columns: KProperty<C>): Update<T, C
202202
*
203203
* For example:
204204
*
205-
* `val length by `[column][org.jetbrains.kotlinx.dataframe.api.column]`<Double>()`
205+
* `val length by `[column][org.jetbrains.kotlinx.dataframe.api.column]`<`[Double][Double]`>()`
206206
*
207-
* `val age by `[column][org.jetbrains.kotlinx.dataframe.api.column]`<Double>()`
207+
* `val age by `[column][org.jetbrains.kotlinx.dataframe.api.column]`<`[Double][Double]`>()`
208208
*
209209
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]`(length, age)`
210210
*
@@ -233,7 +233,8 @@ public fun <T, C> DataFrame<T>.update(columns: Iterable<ColumnReference<C>>): Up
233233
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { length }.`[where][org.jetbrains.kotlinx.dataframe.api.where]` { it > 10.0 }`
234234
*
235235
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { `[cols][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.cols]`(1..5) }.`[where][org.jetbrains.kotlinx.dataframe.api.where]` { `[index][org.jetbrains.kotlinx.dataframe.index]`() > 4 && city != "Paris" }`
236-
*
236+
*
237+
*
237238
*
238239
*
239240
* @param predicate The [row value filter][RowValueFilter] to select the rows to update.
@@ -273,6 +274,7 @@ private interface CommonUpdateAtFunctionDoc {
273274
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { name }.`[at][org.jetbrains.kotlinx.dataframe.api.at]`(1, 2, 3, 4).`[with][org.jetbrains.kotlinx.dataframe.api.with]` { "Empty" }`
274275
*
275276
* ## This At Overload
277+
*
276278
* Provide a [Collection][Collection]<[Int][Int]> of row indices to update.
277279
*
278280
* @param rowIndices The indices of the rows to update. Either a [Collection][Collection]<[Int][Int]>, an [IntRange][IntRange], or just `vararg` indices.
@@ -292,6 +294,7 @@ public fun <T, C> Update<T, C>.at(rowIndices: Collection<Int>): Update<T, C> = w
292294
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { name }.`[at][org.jetbrains.kotlinx.dataframe.api.at]`(1, 2, 3, 4).`[with][org.jetbrains.kotlinx.dataframe.api.with]` { "Empty" }`
293295
*
294296
* ## This At Overload
297+
*
295298
* Provide a `vararg` of [Ints][Int] of row indices to update.
296299
*
297300
* @param rowIndices The indices of the rows to update. Either a [Collection][Collection]<[Int][Int]>, an [IntRange][IntRange], or just `vararg` indices.
@@ -311,6 +314,7 @@ public fun <T, C> Update<T, C>.at(vararg rowIndices: Int): Update<T, C> = at(row
311314
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { name }.`[at][org.jetbrains.kotlinx.dataframe.api.at]`(1, 2, 3, 4).`[with][org.jetbrains.kotlinx.dataframe.api.with]` { "Empty" }`
312315
*
313316
* ## This At Overload
317+
*
314318
* Provide an [IntRange][IntRange] of row indices to update.
315319
*
316320
* @param rowRange The indices of the rows to update. Either a [Collection][Collection]<[Int][Int]>, an [IntRange][IntRange], or just `vararg` indices.
@@ -319,6 +323,7 @@ public fun <T, C> Update<T, C>.at(rowRange: IntRange): Update<T, C> = where { in
319323

320324
/** ## Per Row Col
321325
* Provide a new value for every selected cell given both its row and column using a [row-column expression][org.jetbrains.kotlinx.dataframe.RowColumnExpression].
326+
*
322327
* For example:
323328
*
324329
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { age ` { row, col ->`
@@ -327,7 +332,8 @@ public fun <T, C> Update<T, C>.at(rowRange: IntRange): Update<T, C> = where { in
327332
*
328333
* `}`
329334
*
330-
* .`[perRowCol][org.jetbrains.kotlinx.dataframe.api.perRowCol]}
335+
*
336+
* .`[perRowCol][org.jetbrains.kotlinx.dataframe.api.perRowCol]}
331337
*
332338
* ## See Also
333339
* - [Update with][org.jetbrains.kotlinx.dataframe.api.Update.with] to provide a new value for every selected cell giving its row.
@@ -362,7 +368,8 @@ public typealias UpdateExpression<T, C, R> = AddDataRow<T>.(C) -> R
362368
* [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.
363369
* This is an extension to [RowValueExpression][org.jetbrains.kotlinx.dataframe.RowValueExpression] and
364370
* [RowExpression][org.jetbrains.kotlinx.dataframe.RowExpression] that provides access to
365-
* the modified/generated value of the preceding row ([AddDataRow.newValue][org.jetbrains.kotlinx.dataframe.api.AddDataRow.newValue]). ## See Also
371+
* the modified/generated value of the preceding row ([AddDataRow.newValue][org.jetbrains.kotlinx.dataframe.api.AddDataRow.newValue]).
372+
* ## See Also
366373
* - [Update per col][org.jetbrains.kotlinx.dataframe.api.Update.perCol] to provide a new value for every selected cell giving its column.
367374
* - [Update per row col][org.jetbrains.kotlinx.dataframe.api.Update.perRowCol] to provide a new value for every selected cell giving its row and column.
368375
* @param expression The [Row Value Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRow.RowValueExpression.WithExample] to update the rows with.
@@ -380,6 +387,7 @@ private interface SeeAlsoWith
380387
* Updates selected [column group][ColumnGroup] as a [DataFrame] with the given [expression].
381388
*
382389
* Provide a new value for every selected data frame using a [dataframe expression][org.jetbrains.kotlinx.dataframe.DataFrameExpression].
390+
*
383391
* For example:
384392
*
385393
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { name ` { `[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { lastName } }`
@@ -427,6 +435,7 @@ private interface UpdatePerColMap
427435
* ## This Per Col Overload
428436
* Provide a new value for every selected cell per column using a [Map][Map]`<`[colName: String][String]`, value: C>`
429437
* or [DataRow][org.jetbrains.kotlinx.dataframe.DataRow] as Map.
438+
*
430439
* For example:
431440
*
432441
* `val defaults = {@includeArg [CommonUpdatePerColMapDoc][org.jetbrains.kotlinx.dataframe.api.CommonUpdatePerColMapDoc]}`
@@ -451,13 +460,15 @@ private interface CommonUpdatePerColMapDoc
451460
* ## This Per Col Overload
452461
* Provide a new value for every selected cell per column using a [Map][Map]`<`[colName: String][String]`, value: C>`
453462
* or [DataRow][org.jetbrains.kotlinx.dataframe.DataRow] as Map.
463+
*
454464
* For example:
455465
*
456466
* `val defaults = `[mapOf][mapOf]`("name" to "Empty", "age" to 0)`
457467
*
458468
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { name and age }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { ... }.`[perCol][org.jetbrains.kotlinx.dataframe.api.perCol]`(defaults)`
459469
*
460-
* @throws IllegalArgumentException if a value for a selected cell's column is not defined in [values][values].
470+
* @throws IllegalArgumentException if a value for a selected cell's column is not defined in [values][values].
471+
*
461472
*
462473
* @param values The [Map]<[String], Value> to provide a new value for every selected cell.
463474
* For each selected column, there must be a value in the map with the same name.
@@ -480,6 +491,7 @@ public fun <T, C> Update<T, C>.perCol(values: Map<String, C>): DataFrame<T> = up
480491
* ## This Per Col Overload
481492
* Provide a new value for every selected cell per column using a [Map][Map]`<`[colName: String][String]`, value: C>`
482493
* or [DataRow][org.jetbrains.kotlinx.dataframe.DataRow] as Map.
494+
*
483495
* For example:
484496
*
485497
* `val defaults = df.`[getRows][org.jetbrains.kotlinx.dataframe.DataFrame.getRows]`(`[listOf][listOf]`(0))`
@@ -488,7 +500,8 @@ public fun <T, C> Update<T, C>.perCol(values: Map<String, C>): DataFrame<T> = up
488500
*
489501
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { name and age }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { ... }.`[perCol][org.jetbrains.kotlinx.dataframe.api.perCol]`(defaults)`
490502
*
491-
* @throws IllegalArgumentException if a value for a selected cell's column is not defined in [values][values]. .`[with][org.jetbrains.kotlinx.dataframe.api.Update.with]` { "Empty" }`
503+
* @throws IllegalArgumentException if a value for a selected cell's column is not defined in [values][values].
504+
* .`[with][org.jetbrains.kotlinx.dataframe.api.Update.with]` { "Empty" }`
492505
*
493506
* `.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { age }.`[with][org.jetbrains.kotlinx.dataframe.api.Update.with]` { 0 }`
494507
*
@@ -517,7 +530,8 @@ public fun <T, C> Update<T, C>.perCol(values: AnyRow): DataFrame<T> = perCol(val
517530
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { age ` { `[mean][org.jetbrains.kotlinx.dataframe.DataColumn.mean]`(skipNA = true) }`
518531
*
519532
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { age ` { `[count][org.jetbrains.kotlinx.dataframe.DataColumn.count]` { it > 10 } }`
520-
* .`[perCol][org.jetbrains.kotlinx.dataframe.api.perCol]}
533+
*
534+
* .`[perCol][org.jetbrains.kotlinx.dataframe.api.perCol]}
521535
*
522536
* @param valueSelector The [Column Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenColumn.ColumnExpression] to provide a new value for every selected cell giving its column.
523537
*/
@@ -591,10 +605,12 @@ public fun <T, C> Update<T, C?>.notNull(expression: UpdateExpression<T, C, C>):
591605
* For more information: [See `update` on the documentation website.](https://kotlin.github.io/dataframe/update.html)
592606
* ## ‎
593607
* The columns to update need to be selected. See [Selecting Columns][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns] for all the selecting options.
594-
* ## This Update Overload ### This overload is a combination of [update][org.jetbrains.kotlinx.dataframe.api.update] and [with][org.jetbrains.kotlinx.dataframe.api.Update.with].
608+
* ## This Update Overload
609+
* ### This overload is a combination of [update][org.jetbrains.kotlinx.dataframe.api.update] and [with][org.jetbrains.kotlinx.dataframe.api.Update.with].
595610
*
596611
* Select columns using [column accessors][org.jetbrains.kotlinx.dataframe.columns.ColumnReference]
597612
* ([Column Accessors API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi.ColumnAccessorsApi]).
613+
*
598614
* Provide a new value for every selected cell given its row and its previous value using a
599615
* [row value expression][org.jetbrains.kotlinx.dataframe.RowValueExpression].
600616
*
@@ -627,9 +643,11 @@ public fun <T, C> DataFrame<T>.update(
627643
* For more information: [See `update` on the documentation website.](https://kotlin.github.io/dataframe/update.html)
628644
* ## ‎
629645
* The columns to update need to be selected. See [Selecting Columns][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns] for all the selecting options.
630-
* ## This Update Overload ### This overload is a combination of [update][org.jetbrains.kotlinx.dataframe.api.update] and [with][org.jetbrains.kotlinx.dataframe.api.Update.with].
646+
* ## This Update Overload
647+
* ### This overload is a combination of [update][org.jetbrains.kotlinx.dataframe.api.update] and [with][org.jetbrains.kotlinx.dataframe.api.Update.with].
631648
*
632649
* Select columns using [KProperties][KProperty] ([KProperties API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi.KPropertiesApi]).
650+
*
633651
* Provide a new value for every selected cell given its row and its previous value using a
634652
* [row value expression][org.jetbrains.kotlinx.dataframe.RowValueExpression].
635653
*
@@ -662,10 +680,12 @@ public fun <T, C> DataFrame<T>.update(
662680
* For more information: [See `update` on the documentation website.](https://kotlin.github.io/dataframe/update.html)
663681
* ## ‎
664682
* The columns to update need to be selected. See [Selecting Columns][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns] for all the selecting options.
665-
* ## This Update Overload ### This overload is a combination of [update][org.jetbrains.kotlinx.dataframe.api.update] and [with][org.jetbrains.kotlinx.dataframe.api.Update.with].
683+
* ## This Update Overload
684+
* ### This overload is a combination of [update][org.jetbrains.kotlinx.dataframe.api.update] and [with][org.jetbrains.kotlinx.dataframe.api.Update.with].
666685
*
667686
* Select columns using their [column names][String]
668687
* ([String API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi.StringApi]).
688+
*
669689
* Provide a new value for every selected cell given its row and its previous value using a
670690
* [row value expression][org.jetbrains.kotlinx.dataframe.RowValueExpression].
671691
*
@@ -708,7 +728,8 @@ private interface CommonSpecificWithDocSecondArg
708728
*
709729
* For example:
710730
*
711-
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { id }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { it < 0 }.`[withNull][org.jetbrains.kotlinx.dataframe.api.withNull]`()`
731+
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { id }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { it < 0 }.`[withNull][org.jetbrains.kotlinx.dataframe.api.withNull]`()`
732+
*
712733
*
713734
*/
714735
public fun <T, C> Update<T, C>.withNull(): DataFrame<T> = with { null }
@@ -719,7 +740,8 @@ public fun <T, C> Update<T, C>.withNull(): DataFrame<T> = with { null }
719740
*
720741
* For example:
721742
*
722-
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { id }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { it < 0 }.`[withZero][org.jetbrains.kotlinx.dataframe.api.withZero]`()`
743+
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { id }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { it < 0 }.`[withZero][org.jetbrains.kotlinx.dataframe.api.withZero]`()`
744+
*
723745
*
724746
*/
725747
public fun <T, C> Update<T, C>.withZero(): DataFrame<T> = updateWithValuePerColumnImpl { 0 as C }
@@ -730,7 +752,8 @@ public fun <T, C> Update<T, C>.withZero(): DataFrame<T> = updateWithValuePerColu
730752
*
731753
* For example:
732754
*
733-
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { id }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { it < 0 }.`[withValue][org.jetbrains.kotlinx.dataframe.api.withValue]`(-1)`
755+
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { id }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { it < 0 }.`[withValue][org.jetbrains.kotlinx.dataframe.api.withValue]`(-1)`
756+
*
734757
*
735758
*
736759
* @param value The value to set the selected rows to. In contrast to [with][Update.with], this must be the same exact type.

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@ private interface DocumentationUrls {
3535
interface FillNA
3636
}
3737

38+
/** [See `drop` on the documentation website.](https://kotlin.github.io/dataframe/drop.html) */
39+
interface Drop {
40+
41+
/** [See `dropNulls` on the documentation website.](https://kotlin.github.io/dataframe/drop.html#dropnulls) */
42+
interface DropNulls
43+
44+
/** [See `dropNaNs` on the documentation website.](https://kotlin.github.io/dataframe/drop.html#dropnans) */
45+
interface DropNaNs
46+
47+
/** [See `dropNA` on the documentation website.](https://kotlin.github.io/dataframe/drop.html#dropna) */
48+
interface DropNA
49+
50+
}
51+
3852
/** [See Access APIs on the documentation website.](https://kotlin.github.io/dataframe/apilevels.html) */
3953
interface AccessApis {
4054

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ internal interface ExpressionsGivenDataFrame {
1919

2020
/**
2121
* Provide a new value for every selected data frame using a [dataframe expression][org.jetbrains.kotlinx.dataframe.DataFrameExpression].
22+
*
2223
* For example:
2324
*
2425
* {@includeArg [OperationArg][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenDataFrame.OperationArg]}` { `[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { lastName } }`

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import org.jetbrains.kotlinx.dataframe.RowValueExpression as DfRowValueExpressio
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]).
29+
*
2930
* A Row Expression is similar to a [Row Condition][org.jetbrains.kotlinx.dataframe.documentation.SelectingRows] but that expects a [Boolean][Boolean] as result.
3031
*/
3132
internal interface ExpressionsGivenRow {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ internal interface ExpressionsGivenRowAndColumn {
2525

2626
/**
2727
* Provide a new value for every selected cell given both its row and column using a [row-column expression][org.jetbrains.kotlinx.dataframe.RowColumnExpression].
28+
*
2829
* For example:
2930
*
3031
* `df.`operation` { row, col ->`

0 commit comments

Comments
 (0)