Skip to content

ENH: Series between inclusive end point bifurcation #12398

Closed
@colinalexander

Description

@colinalexander

Allow ability to distinguish inclusiveness of left and right boundaries. I've written the code and tests, but need a GH tracking number prior to submitting a PR.

    def between(self, left, right, inclusive=True):
        """
        Return boolean Series equivalent to left <= series <= right. NA values
        will be treated as False

        Parameters
        ----------
        left : scalar
            Left boundary
        right : scalar
            Right boundary
        inclusive : boolean for both left and right or iterable pair.
            Whether or not to include the left and right boundary.
            If a tuple pair, the boundaries can be set separately
            (e.g. (False, True) for left < series <= right).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions