-
Notifications
You must be signed in to change notification settings - Fork 368
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
a new method of the flatten function in DataFrames #2890
Comments
As commented on Slack. The operation you request is Let us wait for opinions. |
thanks for your attention. |
But under your thinking all data frames in |
Additionally, I think that allowing It would not work if the data frames have different keys, and you need to convert to
would maybe work. I'm not sure this is desirable though. This might not be consistent with how |
This is what I also thought but I have exactly the same reservations. Now I have realized that actually assuming the columns match in all data frames the following works assuming non-dataframe columns form unique keys (which I guess is expected):
|
and if it is not unique:
|
Here she is. |
Would |
Maybe. |
this is what I can do ...
but i get |
I meant this:
and then ideally you would do:
but now I see that I need to fix |
Ah - this is not as easy as I have thought. @nalimilan - what do you think. Currently in |
As a second thought - maybe adding something like |
another way to get the result using only "table functions" |
the fastest form I have found, at least for the example with a few lines, is the following (although less elegant).
|
Wouldn't it make sense to treat any values that do not support Regarding |
We did not use broadcasting because 1-element collections are automatically resized with broadcasting, which can lead to hard to catch bugs in this context. What we could do (following your proposal):
What do you think? |
Ah right, broadcasting collections would be risky. But maybe we can repeat scalars (including strings) even without requiring |
We could. It would be mildly breaking but acceptable. We then could just do |
I am closing this issue as it is handled in #3258 so let us keep the discussion there (somehow I am not able to link this issue to that PR) |
Now tracked in #3116 |
what do you think of the utility of having a method of the flatten function in DataFrames that expands a dataframe type df2 in the form dfexp?
this is a function that does what is indicated, just to give an idea of what is required not to suggest how it should be done.
The text was updated successfully, but these errors were encountered: