Skip to content

Added GroupBy transformation KDocs - #1936

Open
AndreiKingsley wants to merge 2 commits into
masterfrom
transformations_kdocs
Open

Added GroupBy transformation KDocs#1936
AndreiKingsley wants to merge 2 commits into
masterfrom
transformations_kdocs

Conversation

@AndreiKingsley

@AndreiKingsley AndreiKingsley commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Closes #1526 + KDocs for DataFrame.sort..() methods + renamed .desc() to .reversed()

@Jolanrensen

Copy link
Copy Markdown
Collaborator

please update the description to include the .reversed() function :)

* This is an entity formed by calling any (combination) of the functions
* in the DSL that is or can be resolved into a single column.
*
* Column Selection DSL allows using [Extension Properties][AccessApis.ExtensionPropertiesApi]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*The Columns Selection DSL

Comment thread core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/sort.kt
Comment thread core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/sort.kt
private typealias SortDslSnippet = Nothing

/**
* A specialized [ColumnsSelectionDsl] for selecting columns to sort rows by

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use {@include [ColumnsSelectionDslLink]}

*
* @include [SortDslSnippet]
*
* See {@include [CSDslLink]}.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah it seems we have two of these links

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{@include [ColumnsSelectionDslLink]} and {@include [CSDslLink]} do the same thing

Comment thread core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/sort.kt
* gb.sortByGroup { group -> group.rowsCount() * group.quantity.max() }
* ```
*
* @param [nullsLast] Whether `null` values should be placed after non-null values.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again "after"? better: "considered greater than non-null values"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually... if "last" always means "last", like I commented before, it's probably fine. I'm just a bit confused about ascending/descending + nullsFirst/nullsLast

Comment thread core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/sort.kt
Comment thread core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/sort.kt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add groupBy and pivot transformations KDocs

2 participants