DataFrame.groupby doesn't preserve _metadata · Issue #29442 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
I'm following the 0.25.3 documentation on using _metadata.
sdf = SubclassedDataFrame2(my_data_as_dictionary) sdf.added_property = 'hello pandas' df = sdf.groupby('mycategorical')[['myfloat1', 'myfloat2']].sum() print(df.added_property)
The above output produces the result:
AttributeError: 'DataFrame' object has no attribute 'added_property'
added_property is not being "passed to manipulation results" as described in the documentation.