You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://search.maven.org/artifact/org.jetbrains.kotlinx/dataframe)
5
+
[](https://search.maven.org/artifact/org.jetbrains.kotlinx/dataframe)
6
6
[)
26
+
27
+
> [Should be removed and moved to `:samples` module](https://github.com/Kotlin/dataframe/issues/898).
28
+
29
+
Tests in this module contain code samples used for import into documentation
30
+
using [Korro](https://github.com/devcrocod/korro).
14
31
15
-
Code samples for the documentation website reside
16
-
in [core/.../test/.../samples/api](./src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api) (for samples that depend solely on `dataframe-core`),
17
-
and [tests/.../samples/api](../tests/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api) (for samples can depend on other I/O modules)
18
-
and they are copied over to Markdown files in [docs/StardustDocs/topics](../docs/StardustDocs/topics)
19
-
by [Korro](https://github.com/devcrocod/korro).
20
32
21
-
### ~~Explainer dataframes~~ NOTE: This is being moved to [tests](../tests)
33
+
### ~~Explainer dataframes~~ (NOTE: This is being moved to [:samples](../samples))
34
+
35
+
> [Should be removed and migrated to SampleHelper](https://github.com/Kotlin/dataframe/issues/898).
22
36
23
37
Aside from code samples, `@TransformDataFrameExpressions` annotated test functions also generate sample
24
38
dataframe HTML files that can be used as iFrames on the documentation website.
@@ -31,15 +45,3 @@ retrieves the intermediate DataFrame expressions thanks to our "explainer" compi
31
45
We can also generate "normal" DataFrame samples for the website. This can be done using the
* Returns `true` if at least one row in this [DataFrame] satisfies the given [predicate].
32
+
*
33
+
* The [predicate] is a [RowFilter][org.jetbrains.kotlinx.dataframe.RowFilter] — a lambda that receives each [DataRow][org.jetbrains.kotlinx.dataframe.DataRow] as both `this` and `it`
34
+
* and is expected to return a [Boolean] value.
35
+
*
36
+
* It allows you to define conditions using the row's values directly,
37
+
* including through [extension properties][org.jetbrains.kotlinx.dataframe.documentation.ExtensionPropertiesAPIDocs] for convenient and type-safe access.
38
+
*
39
+
* ### Example
40
+
* ```kotlin
41
+
* // Check if there is at least one row where "age" is greater than 18
42
+
* val hasAdults = df.any { age > 18 }
43
+
* ```
44
+
*
45
+
* @param predicate A [RowFilter] lambda that takes a [DataRow] (as both `this` and `it`)
46
+
* and returns `true` if the row should be considered a match.
47
+
* @return `true` if at least one row satisfies the [predicate], `false` otherwise.
0 commit comments