pola-rs / r-polars

Bring polars to R
https://pola-rs.github.io/r-polars/
Other
415 stars 36 forks source link

Implement `$struct$unnest()` #1010

Open etiennebacher opened 2 months ago

etiennebacher commented 2 months ago

Part of #998

pl$Series(name = "foo", values = 1)$to_struct()$struct$unnest()
shape: (1, 1)
┌─────┐
│ foo │
│ --- │
│ f64 │
╞═════╡
│ 1.0 │
└─────┘

@eitsupi I did as in #1002 but I'm not sure it's what you had in mind

eitsupi commented 2 months ago

I think this is a good implementation, but the Rd file is not generated. I think we can merge them for the time being and think about the documentation later.

I was imagining that it would be better to define the SeriesStruct_unnest and make it something like unnest=SeriesStruct_unnest

etiennebacher commented 2 months ago

the Rd file is not generated

It is generated, I just had to specify the @name otherwise it's named Series_unnest

etiennebacher commented 2 months ago

Ah no my bad, the usage section is wrong

etiennebacher commented 2 months ago

I'd rather find a solution here than coming back later for this.

eitsupi commented 3 weeks ago

Can we merge this?

etiennebacher commented 3 weeks ago

No the Usage section in the docs is still wrong