Skip to content

Commit 3bf6f8d

Browse files
filterBy remove kdocs
1 parent 3d43035 commit 3bf6f8d

File tree

2 files changed

+2
-49
lines changed

2 files changed

+2
-49
lines changed

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

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public inline fun <T> DataColumn<T>.filter(predicate: Predicate<T>): DataColumn<
5858
*
5959
* See also:
6060
* - [drop][DataFrame.drop], which drops rows based on values within the row.
61-
* - [distinct][DataFrame.distinct], which filters rows with duplicated values.
61+
* - [distinct][DataFrame.distinct], which filters out rows with duplicated values.
6262
*
6363
* ### Example
6464
* ```kotlin
@@ -77,57 +77,10 @@ public inline fun <T> DataFrame<T>.filter(predicate: RowFilter<T>): DataFrame<T>
7777
predicate(row, row)
7878
}.let { get(it) }
7979

80-
/**
81-
* Filters the rows of this [DataFrame] based on the [Boolean] values in the specified [column].
82-
*
83-
* Returns a new [DataFrame] containing only the rows where the value in the given [column] is `true`.
84-
*
85-
* @include [SelectingColumns.ColumnGroupsAndNestedColumnsMention]
86-
*
87-
* For more information, see: {@include [DocumentationUrls.Filter]}
88-
*
89-
* See also: [filter], which allows filtering rows based on values within the row.
90-
*
91-
* ### This Gather Overload
92-
*/
93-
@ExcludeFromSources
94-
internal interface FilterByDocs
95-
96-
/**
97-
* {@include [FilterByDocs]}
98-
* {@include [SelectingColumns.Dsl]}
99-
*
100-
* ### Examples
101-
* ```kotlin
102-
* // Filter rows by the "isHappy" column
103-
* df.filterBy { isHappy }
104-
*
105-
* // Filter rows by a single `Boolean` column
106-
* df.filterBy { colsOf<Boolean>().single() }
107-
* ```
108-
*
109-
* @param column A [ColumnSelector] that selects the Boolean column to use for filtering.
110-
* Only rows where the value in this column is `true` will be included.
111-
* @return A new [DataFrame] containing only the rows where the selected column is `true`.
112-
*/
11380
@Deprecated(message = FILTER_BY, replaceWith = ReplaceWith(FILTER_BY_REPLACE), level = DeprecationLevel.ERROR)
11481
public fun <T> DataFrame<T>.filterBy(column: ColumnSelector<T, Boolean>): DataFrame<T> =
11582
getRows(getColumn(column).toList().getTrueIndices())
11683

117-
/**
118-
* {@include [FilterByDocs]}
119-
* {@include [SelectingColumns.ColumnNames]}
120-
*
121-
* ### Example
122-
* ```kotlin
123-
* // Filter rows by the "isHappy" column
124-
* df.filterBy("isHappy")
125-
* ```
126-
*
127-
* @param column The name of the `Boolean` column to use for filtering.
128-
* Only rows where the value in this column is `true` will be included.
129-
* @return A new [DataFrame] containing only the rows where the specified column is `true`.
130-
*/
13184
@Suppress("DEPRECATION_ERROR")
13285
@Deprecated(message = FILTER_BY, replaceWith = ReplaceWith(FILTER_BY_REPLACE), level = DeprecationLevel.ERROR)
13386
public fun <T> DataFrame<T>.filterBy(column: String): DataFrame<T> = filterBy { column.toColumnOf() }

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ internal const val CONVERT_TO_URL_REPLACE = "convertToUrl()"
110110
internal const val TO_URL = "This function is replaced by `toUrl()`. $MESSAGE_1_0"
111111
internal const val TO_URL_REPLACE = "toUrl()"
112112

113-
internal const val FILTER_BY = "This function is deprecated in favor of `filter { }`. $MESSAGE_1_0"
113+
internal const val FILTER_BY = "This function is deprecated in favor of `filter { }`. $MESSAGE_1_0"
114114
internal const val FILTER_BY_REPLACE = "filter { column }"
115115

116116
// endregion

0 commit comments

Comments
 (0)