Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,20 @@ internal interface DocumentationUrls {
/** [See Row Expressions on the documentation website.]({@include [Url]}/datarow.html#row-expressions) */
typealias RowExpressions = Nothing

/** [See RowExpression on the documentation website.]({@include [Url]}/datarow.html#rowexpression) */
typealias RowExpression = Nothing

/** [See RowValueExpression on the documentation website.]({@include [Url]}/datarow.html#rowvalueexpression) */
typealias RowValueExpression = Nothing

/** [See Row Conditions on the documentation website.]({@include [Url]}/datarow.html#row-conditions) */
typealias RowConditions = Nothing

/** [See RowFilter on the documentation website.]({@include [Url]}/datarow.html#rowfilter) */
typealias RowFilter = Nothing

/** [See RowValueFilter on the documentation website.]({@include [Url]}/datarow.html#rowvaluefilter) */
typealias RowValueFilter = Nothing
}

/** [See `drop` on the documentation website.]({@include [Url]}/drop.html) */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ internal interface ExpressionsGivenRow {
@ExcludeFromSources
typealias AddDataRowNote = Nothing

/** Provide a new value for every selected cell given its row using a [row expression][DfRowExpression]. */
/**
* Provide a new value for every selected cell given its row using a [row expression][DfRowExpression].
*
* Fore more information, {@include [DocumentationUrls.DataRow.RowExpression]}
*/
interface RowExpression {

/**
Expand All @@ -79,6 +83,8 @@ internal interface ExpressionsGivenRow {

/** Provide a new value for every selected cell given its row and its previous value using a
* [row value expression][DfRowValueExpression].
*
* Fore more information, {@include [DocumentationUrls.DataRow.RowValueExpression]}
*/
interface RowValueExpression {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ internal interface SelectingRows {
* including through [extension properties][AccessApis.ExtensionPropertiesApi]
* for convenient and type-safe access.
*
* Fore more information, {@include [DocumentationUrls.DataRow.RowConditions]}
* Fore more information, {@include [DocumentationUrls.DataRow.RowFilter]}
*/
@ExcludeFromSources
typealias RowFilterSnippet = Nothing
Expand All @@ -60,7 +60,7 @@ internal interface SelectingRows {
* including through [extension properties][AccessApis.ExtensionPropertiesApi]
* for convenient and type-safe access.
*
* Fore more information, {@include [DocumentationUrls.DataRow.RowConditions]}
* Fore more information, {@include [DocumentationUrls.DataRow.RowValueFilter]}
*/
@ExcludeFromSources
typealias RowValueFilterSnippet = Nothing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ internal fun AnyFrame.toHtmlData(
}
val nested = if (col is ColumnGroup<*>) {
col.columns().map {
col.columnToJs(it.addParentPath(col.path), rowsLimit, configuration, renderRootDf)
renderRootDf.columnToJs(it.addParentPath(col.path), rowsLimit, configuration, renderRootDf)
}
} else {
emptyList()
Expand Down
13 changes: 13 additions & 0 deletions core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/format.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import org.jetbrains.kotlinx.dataframe.samples.api.TestBase
import org.jetbrains.kotlinx.dataframe.samples.api.age
import org.jetbrains.kotlinx.dataframe.samples.api.firstName
import org.jetbrains.kotlinx.dataframe.samples.api.isHappy
import org.jetbrains.kotlinx.dataframe.samples.api.lastName
import org.jetbrains.kotlinx.dataframe.samples.api.name
import org.jetbrains.kotlinx.dataframe.samples.api.weight
import org.junit.Test
Expand Down Expand Up @@ -314,6 +315,18 @@ class FormatTests : TestBase() {
formatted::class.simpleName shouldBe "FormattedFrame"
}

@Test
fun `format with where clause on df with a column group`() {
val formatted = df
.format { all() }
.where { age < 18 }
.with { background(red) and textColor(black) }

val html = formatted.toHtml().toString()

html.split("background-color:#ff0000").size - 1 shouldBe 7
}

// Issue #982
@Suppress("ktlint:standard:argument-list-wrapping")
@Test
Expand Down

This file was deleted.

Loading
Loading