From d87cd963dc8a70da96b116f2cc5d0ed837351a72 Mon Sep 17 00:00:00 2001 From: Nikita Klimenko Date: Wed, 8 Oct 2025 13:45:02 +0300 Subject: [PATCH 1/2] Remove the example of deprecated df.get --- .../kotlinx/dataframe/samples/api/Access.kt | 10 +----- docs/StardustDocs/topics/select.md | 36 +++++++------------ 2 files changed, 14 insertions(+), 32 deletions(-) diff --git a/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/Access.kt b/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/Access.kt index 760d4609f6..bec11df6ab 100644 --- a/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/Access.kt +++ b/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/Access.kt @@ -200,15 +200,7 @@ class Access : TestBase() { @Test @TransformDataFrameExpressions - fun getColumnsByName_properties() { - // SampleStart - df[df.age, df.weight] - // SampleEnd - } - - @Test - @TransformDataFrameExpressions - fun getColumnsByName_strings() { + fun getColumnsByName() { // SampleStart df["age", "weight"] // SampleEnd diff --git a/docs/StardustDocs/topics/select.md b/docs/StardustDocs/topics/select.md index acb9386681..81451d6371 100644 --- a/docs/StardustDocs/topics/select.md +++ b/docs/StardustDocs/topics/select.md @@ -4,29 +4,6 @@ Two ways to create [`DataFrame`](DataFrame.md) with a subset of columns: -**indexing:** - - - - - -```kotlin -df[df.age, df.weight] -``` - - - - -```kotlin -df["age", "weight"] -``` - - - - - -See [DataFrame indexing](indexing.md) - **selecting:** @@ -52,3 +29,16 @@ df.select("age", "weight") **Related operations**: [remove](remove.md) See [column selectors](ColumnSelectors.md) + +**indexing:** + + + +```kotlin +df["age", "weight"] +``` + + + + +See [DataFrame indexing](indexing.md) From bd4e4097e99cb586a27879d8f7d404af9bac8afa Mon Sep 17 00:00:00 2001 From: Nikita Klimenko Date: Wed, 8 Oct 2025 13:45:51 +0300 Subject: [PATCH 2/2] Update usage of obsolete dataFrameOf syntax --- .../jetbrains/kotlinx/dataframe/samples/api/Create.kt | 9 ++++----- docs/StardustDocs/topics/createDataFrame.md | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/Create.kt b/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/Create.kt index 860c48062e..1cd3432b5f 100644 --- a/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/Create.kt +++ b/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/Create.kt @@ -289,12 +289,11 @@ class Create : TestBase() { @TransformDataFrameExpressions fun createDataFrameFromColumns() { // SampleStart - - val name by columnOf("Alice", "Bob", "Charlie") - val age by columnOf(15, 20, 22) - // DataFrame with 2 columns - val df = dataFrameOf(name, age) + val df = dataFrameOf( + "name" to columnOf("Alice", "Bob", "Charlie"), + "age" to columnOf(15, 20, 22) + ) // SampleEnd } diff --git a/docs/StardustDocs/topics/createDataFrame.md b/docs/StardustDocs/topics/createDataFrame.md index 163c316587..ccf5f2424d 100644 --- a/docs/StardustDocs/topics/createDataFrame.md +++ b/docs/StardustDocs/topics/createDataFrame.md @@ -49,11 +49,11 @@ val df = dataFrameOf( ```kotlin -val name by columnOf("Alice", "Bob", "Charlie") -val age by columnOf(15, 20, 22) - // DataFrame with 2 columns -val df = dataFrameOf(name, age) +val df = dataFrameOf( + "name" to columnOf("Alice", "Bob", "Charlie"), + "age" to columnOf(15, 20, 22) +) ```