Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

AndreiKingsley
Copy link
Collaborator

close #1388.

# Conflicts:
#	core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/DocumentationUrls.kt
* - [toCamelCase()][RenameClause.toCamelCase] — renames all selected columns to `camelCase`.
*
* See [Grammar][RenameDocs.Grammar] for more details.
*/
@HasSchema(schemaArg = 0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like we need a catalogue / design doc with all annotations, invented this year @koperagen ?
Could you create a simple md doc with them?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I recently updated the kdoc for HasSchema, should be clear now. They're all in the same file

* Each pair consists of the current column name and the desired new name.
*
* Example:
* ```
Copy link
Collaborator

Choose a reason for hiding this comment

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

kt

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd still mark examples with kotlin or kt so the highlighting is correct

* @param mappings A vararg of pairs where each pair consists of the original column name (`first`)
* and the new column name (`second`).
* @return A new [DataFrame] with the renamed columns.
*/
@Refine
@Interpretable("RenameMapping")
public fun <T> DataFrame<T>.rename(vararg mappings: Pair<String, String>): DataFrame<T> =
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this one be mentioned in the grammar as well?

Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe also renameToCamelCase?

Copy link
Collaborator Author

@AndreiKingsley AndreiKingsley Aug 25, 2025

Choose a reason for hiding this comment

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

I believe they're out of grammar. I mean we should mention them, but not as part of operation grammar

Copy link
Collaborator

@Jolanrensen Jolanrensen left a comment

Choose a reason for hiding this comment

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

nice!

@AndreiKingsley AndreiKingsley merged commit 3cc2006 into master Aug 27, 2025
3 checks passed
@AndreiKingsley AndreiKingsley deleted the rename_kdocs branch August 27, 2025 09:08
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 KDocs for Rename function
4 participants