-
Notifications
You must be signed in to change notification settings - Fork 76
Added 3 APIs for Flatten function #307
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,13 +11,36 @@ flatten [ { columns } ] | |
| Columns after flattening will keep their original names. Potential column name clashes are resolved by adding minimal possible name prefix from ancestor columns. | ||
|
|
||
| <!---FUN flatten--> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you renamed this function to We use Korro to check that samples in stardust are actually compilable. So make sure that all examples in markdown are surrounded like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Look, for example insert It has in documentation the following and in modify the following Looks like I do the same, but is the best way to check that I am right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Template looks like: name of function underscore acess api There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh now I see! Didn't know this was possible. Cool :) |
||
| <tabs> | ||
| <tab title="Properties"> | ||
|
|
||
| ```kotlin | ||
| // name.firstName -> firstName | ||
| // name.lastName -> lastName | ||
| df.flatten { name } | ||
| ``` | ||
|
|
||
| </tab> | ||
| <tab title="Accessors"> | ||
|
|
||
| ```kotlin | ||
| val name by columnGroup() | ||
| val firstName by name.column<String>() | ||
| val lastName by name.column<String>() | ||
|
|
||
| // name.firstName -> firstName | ||
| // name.lastName -> lastName | ||
| df.flatten(name) | ||
| ``` | ||
|
|
||
| </tab> | ||
| <tab title="Strings"> | ||
|
|
||
| ```kotlin | ||
| df.flatten("name") | ||
| ``` | ||
|
|
||
| </tab></tabs> | ||
| <!---END--> | ||
|
|
||
| To remove all column groupings in [`DataFrame`](DataFrame.md), invoke `flatten` without parameters: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.