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

unnest #3116

Open
jariji opened this issue Aug 14, 2022 · 4 comments · May be fixed by #3258
Open

unnest #3116

jariji opened this issue Aug 14, 2022 · 4 comments · May be fixed by #3258
Labels
Milestone

Comments

@jariji
Copy link
Contributor

jariji commented Aug 14, 2022

Extract a table-valued column into top-level columns. Code by Bogumił Kamiński on Slack.

unnest(df, col) = flatten(
    select(df, Not(col), col => ByRow(Tables.columntable) => AsTable), 
    names(df, Not(col))
)

This might come with its opposite, nest.

See also tidyr - nest and unnest.

@bkamins bkamins added this to the 1.5 milestone Aug 15, 2022
@bkamins
Copy link
Member

bkamins commented Aug 15, 2022

OK, let us decide on these + #2767 and #2890 in 1.5 release.

This requires a careful design, especially, handling the case when unnested data frames do not have matching column names.

@bkamins
Copy link
Member

bkamins commented Oct 14, 2022

x-ref: #3005

@bkamins
Copy link
Member

bkamins commented Oct 14, 2022

Do we want unnest to support only data frames, or also other Tables.jl tables? For row-like objects I think that #3005 solution with Tables.dictrowtable is good enough.

@bkamins bkamins linked a pull request Dec 28, 2022 that will close this issue
@bkamins bkamins linked a pull request Dec 28, 2022 that will close this issue
@bkamins
Copy link
Member

bkamins commented Feb 5, 2023

We could not make a decision if we want it or no, so I keep this open.
When working on it:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants