Skip to content

CLN: centrailize _check_percentile #27559

Closed
@jreback

Description

@jreback

we use _check_percentile in a couple of places; its a method on the NDFrame which is not needed, refactor to move it to pandas/core/algorithms.py (near quantile).

pandas/core/generic.py:            self._check_percentile(percentiles)
pandas/core/generic.py:    def _check_percentile(self, q):
pandas/core/series.py:        self._check_percentile(q)
pandas/core/frame.py:        self._check_percentile(q)

there is another reference in groupby added here: #27473; change the validation logic to call this function as well (likely the call will need to be in the quantile call to groupby (pandas/core/groupby/groupby.py)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions