Skip to content

DataFrame.groupby doesn't preserve _metadata #29442

Closed
@pandichef

Description

@pandichef

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions