Skip to content

Commit febc355

Browse files
fix count kdocs
1 parent e0c5798 commit febc355

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,14 @@ public fun <T> DataColumn<T>.count(predicate: Predicate<T>? = null): Int =
4040
/**
4141
* Returns the number of columns in this [DataRow].
4242
*
43-
* For more information: {@include [DocumentationUrls.Count]}
44-
*
4543
* @return the number of columns in this row.
44+
* @see [columnsCount].
4645
*/
4746
public fun AnyRow.count(): Int = columnsCount()
4847

4948
/**
5049
* Counts the number of elements in the current row that satisfy the given [predicate].
5150
*
52-
* For more information: {@include [DocumentationUrls.Count]}
53-
*
5451
* @param predicate A predicate function to test each element.
5552
* The predicate should return `true` for elements to be counted.
5653
* @return The number of elements that satisfy the predicate.
@@ -110,7 +107,7 @@ public inline fun <T> DataFrame<T>.count(predicate: RowFilter<T>): Int = rows().
110107
*
111108
* This is equivalent to applying `.aggregate { count() }`, but more efficient.
112109
*
113-
* See also common [aggregate][Grouped.aggregate].
110+
* See also [DataFrame.groupBy] and common [aggregate][Grouped.aggregate].
114111
*
115112
* For more information: {@include [DocumentationUrls.Count]}
116113
*
@@ -143,7 +140,7 @@ public fun <T> Grouped<T>.count(resultName: String = "count"): DataFrame<T> =
143140
*
144141
* This is equivalent to calling `.aggregate { count(predicate) }`, but more efficient.
145142
*
146-
* See also: common [aggregate][Grouped.aggregate].
143+
* See also [DataFrame.groupBy] and common [aggregate][Grouped.aggregate].
147144
*
148145
* For more information: {@include [DocumentationUrls.Count]}
149146
*
@@ -186,6 +183,7 @@ public inline fun <T> Grouped<T>.count(
186183
* This is equivalent to calling `.aggregate { count() }`, but more efficient.
187184
*
188185
* See also:
186+
* - [pivot].
189187
* - common [aggregate][Pivot.aggregate].
190188
* - [pivotCounts][DataFrame.pivotCounts] shortcut.
191189
*
@@ -223,6 +221,7 @@ public fun <T> Pivot<T>.count(): DataRow<T> = delegate { count() }
223221
* This is equivalent to calling `.aggregate { count(predicate) }`, but more efficient.
224222
*
225223
* See also:
224+
* - [pivot].
226225
* - common [aggregate][Pivot.aggregate].
227226
* - [pivotCounts][DataFrame.pivotCounts] shortcut.
228227
*
@@ -261,6 +260,7 @@ public inline fun <T> Pivot<T>.count(crossinline predicate: RowFilter<T>): DataR
261260
* This is equivalent to calling `.aggregate { count() }`, but more efficient.
262261
*
263262
* See also:
263+
* - [pivot], [DataFrame.groupBy], [Pivot.groupBy] and [GroupBy.pivot].
264264
* - common [aggregate][PivotGroupBy.aggregate];
265265
* - [GroupBy.pivotCounts] shortcut.
266266
*
@@ -297,6 +297,7 @@ public fun <T> PivotGroupBy<T>.count(): DataFrame<T> = aggregate { count() defau
297297
* This is equivalent to calling `.aggregate { count() }`, but more efficient.
298298
*
299299
* See also:
300+
* - [pivot], [DataFrame.groupBy], [Pivot.groupBy] and [GroupBy.pivot].
300301
* - common [aggregate][PivotGroupBy.aggregate];
301302
* - [GroupBy.pivotCounts] shortcut.
302303
*
@@ -314,8 +315,7 @@ public fun <T> PivotGroupBy<T>.count(): DataFrame<T> = aggregate { count() defau
314315
*/
315316
public inline fun <T> PivotGroupBy<T>.count(crossinline predicate: RowFilter<T>): DataFrame<T> =
316317
aggregate {
317-
count(predicate) default
318-
0
318+
count(predicate) default 0
319319
}
320320

321321
// endregion

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import org.jetbrains.kotlinx.dataframe.DataFrame
77
import org.jetbrains.kotlinx.dataframe.annotations.AccessApiOverload
88
import org.jetbrains.kotlinx.dataframe.columns.toColumnSet
99
import org.jetbrains.kotlinx.dataframe.documentation.DocumentationUrls
10+
import org.jetbrains.kotlinx.dataframe.documentation.ExcludeFromSources
1011
import org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns
1112
import org.jetbrains.kotlinx.dataframe.indices
1213
import org.jetbrains.kotlinx.dataframe.util.DEPRECATED_ACCESS_API
@@ -31,7 +32,7 @@ import kotlin.reflect.KProperty
3132
public fun AnyFrame.countDistinct(): Int = countDistinct { all() }
3233

3334
/**
34-
* Returns number of distinct combinations of values in selected [columns] in this [DataFrame].
35+
* Returns number of distinct combinations of values in selected [columns\] in this [DataFrame].
3536
*
3637
* Compares values in the selected columns and returns
3738
* the number of unique values combinations.
@@ -44,6 +45,7 @@ public fun AnyFrame.countDistinct(): Int = countDistinct { all() }
4445
*
4546
* ### This [countDistinct] overload
4647
*/
48+
@ExcludeFromSources
4749
internal interface CountDistinctDocs
4850

4951
/**

0 commit comments

Comments
 (0)