Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Columns Selection DSL KDocs and missing API overloads #331

Merged
merged 34 commits into from
Apr 8, 2023

Conversation

Jolanrensen
Copy link
Collaborator

@Jolanrensen Jolanrensen commented Mar 30, 2023

Adds docs surrounding the Column Selection DSLs

Depends on #318

@Jolanrensen Jolanrensen added the KDocs Improvements or additions to KDocs label Mar 30, 2023
@Jolanrensen Jolanrensen added this to the KDocs for the public API milestone Mar 30, 2023
@Jolanrensen Jolanrensen self-assigned this Mar 30, 2023
@Jolanrensen Jolanrensen changed the title Columns Selection DSL KDocs Columns Selection DSL KDocs and missing API overloads Apr 6, 2023
# Conflicts:
#	core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl.kt
#	core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/update.kt
#	core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl.kt
@Jolanrensen Jolanrensen marked this pull request as ready for review April 7, 2023 14:37
@Jolanrensen Jolanrensen marked this pull request as draft April 7, 2023 15:35
@Jolanrensen Jolanrensen marked this pull request as ready for review April 8, 2023 10:03
Copy link
Collaborator

@koperagen koperagen left a comment

Choose a reason for hiding this comment

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

Nice c: Let's see how this works out.

}

df.select {
"name"["firstName", "lastName"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

it still looks more like "pathOf" for me than slicing

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

pathOf would be "name"["firstName"]["lastName"]. I actually think this is kinda neat. It allows you to select multiple columns way down in a path: "some"["path"]["to"]["multiple", "columns"]

Copy link
Collaborator

@koperagen koperagen Apr 8, 2023

Choose a reason for hiding this comment

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

I think it takes a bit more effort to "parse" this expression and recognize the difference and to understand that the result is multiple columns.
Here the difference is more obvious and it's still quite compact
"some"["path"]["to"].cols("multiple", "columns")

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah for sure :) But again for completeness, should we remove it?
pathOf("path", "to")["a", "b"] doesn't look that wrong

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe? I don't know, let's check how it looks in completion. How discoverable is this API, how many options there are

@Jolanrensen Jolanrensen merged commit 70abdd4 into master Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
KDocs Improvements or additions to KDocs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants