ValueError: Must produce aggregated value, if DataFrame contains a DataFrame as an element #39436
Labels
Apply
Apply, Aggregate, Transform, Map
Bug
Groupby
Nested Data
Data where the values are collections (lists, sets, dicts, objects, etc.).
Uh oh!
There was an error while loading. Please reload this page.
This minimal example assigns the column B the first value of each group:
Hence
Becomes:
If I now modify the value of column B to an array of DataFrames
I get the error:
ValueError: Must produce aggregated value
It seems like this is a bug. There is no logic behind this behavior.
I also think that it did not raise an error in pandas like 2 years ago, when I used the code snippet the last time.
Currently using the newest version 1.2.1
The text was updated successfully, but these errors were encountered: