@@ -8,6 +8,28 @@ import org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver
8
8
import org.jetbrains.kotlinx.dataframe.documentation.DslGrammarTemplateColumnsSelectionDsl.DslGrammarTemplate
9
9
import org.jetbrains.kotlinx.dataframe.impl.columns.ColumnListImpl
10
10
11
+ // region DataFrame
12
+
13
+ /* *
14
+ * Returns `true` if none of the rows in this [DataFrame] satisfies the given [predicate].
15
+ *
16
+ * {@include [org.jetbrains.kotlinx.dataframe.documentation.RowFilterDescription]}
17
+ *
18
+ * ### Example
19
+ * ```kotlin
20
+ * // Check if there is not any row where "age" is greater than 18
21
+ * val hasNoAdults = df.none { age > 18 }
22
+ * ```
23
+ *
24
+ * @param predicate A [RowFilter] lambda that takes a [DataRow] (as both `this` and `it`)
25
+ * and returns `true` if none of the rows should be considered a match.
26
+ * @return `true` if none of the rows satisfies the [predicate], `false` otherwise.
27
+ * @see [DataFrame.any]
28
+ */
29
+ public inline fun <T > DataFrame<T>.none (predicate : RowFilter <T >): Boolean = rows().none { predicate(it, it) }
30
+
31
+ // endregion
32
+
11
33
// region ColumnsSelectionDsl
12
34
13
35
/* *
@@ -54,25 +76,3 @@ public interface NoneColumnsSelectionDsl {
54
76
}
55
77
56
78
// endregion
57
-
58
- // region DataFrame
59
-
60
- /* *
61
- * Returns `true` if none of the rows in this [DataFrame] satisfies the given [predicate].
62
- *
63
- * {@include [org.jetbrains.kotlinx.dataframe.documentation.RowFilterDescription]}
64
- *
65
- * ### Example
66
- * ```kotlin
67
- * // Check if there is not any row where "age" is greater than 18
68
- * val hasNoAdults = df.none { age > 18 }
69
- * ```
70
- *
71
- * @param predicate A [RowFilter] lambda that takes a [DataRow] (as both `this` and `it`)
72
- * and returns `true` if none of the rows should be considered a match.
73
- * @return `true` if none of the rows satisfies the [predicate], `false` otherwise.
74
- * @see [DataFrame.any]
75
- */
76
- public inline fun <T > DataFrame<T>.none (predicate : RowFilter <T >): Boolean = rows().none { predicate(it, it) }
77
-
78
- // endregion
0 commit comments