Open lightningboltemoji opened 6 months ago
Should this raise a ShapeError?
If the explode is the only group key, it raises:
df.group_by(pl.col("b").explode()).all()
# ShapeError: series used as keys should have the same length as the DataFrame
Should this raise a ShapeError?
I think so.
Checks
Reproducible example
Log output
Issue description
When using
explode
inside of agroup_by
, I was expecting to get the same result as exploding then grouping. Instead, it feels like only the first element ofb
was exploded (2
) and the other values (3, 4
) were dropped.I noticed that my output shrunk while refactoring and traced it back to this. No reason for using one over the other. Sorry in advance if I'm thinking about this wrong.
Expected behavior
Both forms produce the bottom dataframe (referring to log output).
Installed versions