RFC, feat: Add support for {Expr, Series}.struct.unnest#3523
RFC, feat: Add support for {Expr, Series}.struct.unnest#3523
{Expr, Series}.struct.unnest#3523Conversation
|
thanks - rather than |
|
@MarcoGorelli I raised the feature request off the back of a discord chat, so don't actually have a specific use case for it, but the person asking about it (Jaw) said:
So I think for a simple use case like that (i.e. loading in json, and parsing out structs into colunms) (that said, if someone starts building a library with Narwhals aimed at unpacking json, it'd probably only be a matter of time before they hit up into something which makes them ask for |
|
Thanks for your feedback @MarcoGorelli
I find this a bit unexpected coming from you, we didn't consider
I would expect that for some backend the internals would not be so far off from what is implemented here. E.g. I couldn't find a way to do it directly on a pyarrow table (I didn't search for long in my defence though). RE:
I guess it could be good to have one such case for any new potential contributor?! |
It makes more sense once you de-sugar it (this is really just a |
😄 well you're right about that
ah i hadn't thought of it like that, thanks, can we get it be like the other selectors then? |
🥳 One caveat though if we go in that direction: I documented this recently in (d231dd0) - since only the latter would return a Feel free to ignore if this was obvious 😅 |
Description
Drafting as RFC since I feel like it should be possible to simplify and reduce the computation calls. I struggled with a few details at start, I might need a set of fresh eyes
What type of PR is this? (check all applicable)
Related issues
{Expr, Series}.struct.unnest#3476Checklist