Skip to content

API/DEPR: numeric_only kwarg for apply/reductions #28900

Closed
@jbrockmendel

Description

@jbrockmendel

A lot of complexity in DataFrame._reduce/apply/groupby ops is driven by the numeric_only=None. In these cases we try to apply the reduction to non-numeric dtypes and if it fails, exclude them. This hugely complicated our exception handling.

We should consider removing that option and require users to subset the appropriate columns before doing their operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ApplyApply, Aggregate, Transform, MapDeprecateFunctionality to remove in pandasNeeds DiscussionRequires discussion from core team before further actionNuisance ColumnsIdentifying/Dropping nuisance columns in reductions, groupby.add, DataFrame.applyReduction Operationssum, mean, min, max, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions