Karl Genockey

Results 246 comments of Karl Genockey

I did also notice an initial `pl.unnest()` implementation https://github.com/pola-rs/polars/pull/3164 spawned from https://github.com/pola-rs/polars/issues/3123

> For example, take the household dataset: This one looks like a simple enough `.melt` + `.pivot`? **Update**: There is no `.pivot` for lazyframes, alternative approach is a litte more...

@avimallu Thanks for the feedback. The household / `.pivot()` example required a materialized dataframe - I did not realize that `.pivot` does not exist in the Lazy API. I changed...

@deanm0000 Julian has had other defaults changed previously e.g. #14515 In this case it seems like it's `15` for Series and `32` for DataFrame? Having them both be the same...

Just adding for reference: > We need to add support for top_k of struct dtypes. https://stackoverflow.com/questions/76596952/

Yes, this would be a useful addition. Just thought I'd add that I think perhaps it would be of more benefit to be able to do this outside of `.unnest()`?...

[`.name.map_fields()`](https://docs.pola.rs/docs/python/dev/reference/expressions/api/polars.Expr.name.map_fields.html#polars.Expr.name.map_fields) has since been added which simplifies things somewhat. (albeit as a separate step)

Too few should error: https://github.com/pola-rs/polars/issues/9052#issuecomment-1564253746 Too few names dropping missing columns is not intended: https://github.com/pola-rs/polars/issues/9052#issuecomment-1564253746

@DGolubets [`.name.map_fields()`](https://docs.pola.rs/docs/python/dev/reference/expressions/api/polars.Expr.name.map_fields.html#polars.Expr.name.map_fields) has since been added which can help if you're using frames. ```python df = rating_Series.to_frame() df.schema["ratings"] # Struct({'Movie': String, 'Theatre': String, 'Avg_Rating': Float64}) df.with_columns( pl.col("ratings").name.map_fields(lambda f: {"Movie": "Film",...

Yeah, it seems the warning only triggers for the *"passing function by string name"* case. This doesn't warn - but I'm unsure if this use of count is deprecated also?...