Skip to content

pandas.core.base.DataError: No numeric types to aggregate #34403

Closed
@ishgupta

Description

@ishgupta

aggregating a boolean fields doesn't allow averaging the data column in the latest version. Is there a new alternative of doing this for boolean attributes, or it should only be handled by transforming it to a int/float only?

data[ group_fields + [ bool_field ]].groupby( group_fields ).mean() produces the error mentioned in subject.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs InfoClarification about behavior needed to assess issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions