Skip to content

Commit 15306b4

Browse files
join docs korro update
1 parent 9cce2a4 commit 15306b4

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

docs/StardustDocs/topics/operations/multiple/join.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ objects will be used as join columns:
119119

120120
<!---FUN dfLeftImplicit-->
121121

122+
```kotlin
123+
dfLeft
124+
```
122125

123126
<!---END-->
124127

@@ -127,7 +130,9 @@ objects will be used as join columns:
127130

128131
<!---FUN dfRightImplicit-->
129132

130-
133+
```kotlin
134+
dfRight
135+
```
131136

132137
<!---END-->
133138

@@ -139,7 +144,7 @@ objects will be used as join columns:
139144
```kotlin
140145
// INNER JOIN on all same-named columns ("name" and "city"):
141146
// Merge when BOTH name AND city are equal; otherwise the row is dropped.
142-
dfLeft.join(dfRight)
147+
dfLeft.join(dfRight) { name and city }
143148
```
144149

145150
<!---END-->

samples/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ korro {
112112
include("docs/StardustDocs/topics/format.md")
113113
include("docs/StardustDocs/topics/guides/*.md")
114114
include("docs/StardustDocs/topics/operations/utils/*.md")
115+
include("docs/StardustDocs/topics/operations/multiple/*.md")
115116
include("docs/StardustDocs/topics/operations/column/*.md")
116117
include("docs/StardustDocs/topics/collectionsInterop/*.md")
117118
include("docs/StardustDocs/topics/dataSources/sql/*.md")
@@ -122,6 +123,7 @@ korro {
122123
include("src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/*.kt")
123124
include("src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/*.kt")
124125
include("src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/utils/*.kt")
126+
include("src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/multiple/*.kt")
125127
include("src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/render/*.kt")
126128
include("src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/collectionsInterop/*.kt")
127129
include("src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/column/*.kt")

samples/src/test/kotlin/org/jetbrains/kotlinx/dataframe/util/defaultHeaderFormatting.kt

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.jetbrains.kotlinx.dataframe.util
22

3-
import org.jetbrains.kotlinx.dataframe.AnyColumnReference
43
import org.jetbrains.kotlinx.dataframe.ColumnsSelector
54
import org.jetbrains.kotlinx.dataframe.DataFrame
65
import org.jetbrains.kotlinx.dataframe.api.CellAttributes
@@ -9,26 +8,25 @@ import org.jetbrains.kotlinx.dataframe.api.FormattingDsl
98
import org.jetbrains.kotlinx.dataframe.api.and
109
import org.jetbrains.kotlinx.dataframe.api.formatHeader
1110
import org.jetbrains.kotlinx.dataframe.api.getColumnsWithPaths
12-
import org.jetbrains.kotlinx.dataframe.api.select
1311
import org.jetbrains.kotlinx.dataframe.api.with
1412

1513
internal val baseColorSet = listOf(
16-
FormattingDsl.rgb(244, 67, 54), // red
17-
FormattingDsl.rgb(33, 150, 243), // blue
18-
FormattingDsl.rgb(76, 175, 80), // green
19-
FormattingDsl.rgb(255, 152, 0), // orange
20-
FormattingDsl.rgb(156, 39, 176), // purple
21-
FormattingDsl.rgb(0, 150, 136), // teal
22-
FormattingDsl.rgb(233, 30, 99) // pink/magenta
14+
FormattingDsl.rgb(244, 67, 54), // red
15+
FormattingDsl.rgb(33, 150, 243), // blue
16+
FormattingDsl.rgb(76, 175, 80), // green
17+
FormattingDsl.rgb(255, 152, 0), // orange
18+
FormattingDsl.rgb(156, 39, 176), // purple
19+
FormattingDsl.rgb(0, 150, 136), // teal
20+
FormattingDsl.rgb(233, 30, 99), // pink/magenta
2321
)
2422

2523
internal val FormattingDsl.monospace: CellAttributes
2624
get() = attr(
2725
"font-family",
28-
"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"
26+
"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
2927
)
3028

31-
internal fun <T> DataFrame<T>.defaultHeaderFormatting(headers: ColumnsSelector<T, *>): FormattedFrame<T> {
29+
internal fun <T> DataFrame<T>.defaultHeaderFormatting(headers: ColumnsSelector<T, *>): FormattedFrame<T> {
3230
val columns = getColumnsWithPaths(headers)
3331
require(columns.size <= baseColorSet.size) {
3432
"Too many headers: ${columns.size}. Max supported is ${baseColorSet.size}."
@@ -45,7 +43,7 @@ internal fun <T> DataFrame<T>.defaultHeaderFormatting(headers: ColumnsSelector<T
4543
}
4644

4745
@Suppress("INVISIBLE_REFERENCE")
48-
internal fun <T> FormattedFrame<T>.defaultHeaderFormatting(headers: ColumnsSelector<T, *>): FormattedFrame<T> {
46+
internal fun <T> FormattedFrame<T>.defaultHeaderFormatting(headers: ColumnsSelector<T, *>): FormattedFrame<T> {
4947
val columns = df.getColumnsWithPaths(headers)
5048
require(columns.size <= baseColorSet.size) {
5149
"Too many headers: ${columns.size}. Max supported is ${baseColorSet.size}."

0 commit comments

Comments
 (0)