pyjanitor-devs/pyjanitor

Add the ability to test whether data is in range in a pandas data frame

Open

#708 geöffnet am 29. Juli 2020

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (164 Forks)batch import
available for hackingenhancementgood first issue

Repository-Metriken

Stars
 (1.217 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 2T 12h) (4 gemergte PRs in 30 T)

Beschreibung

Brief Description

Following up on #703, this issue seeks to introduce the ability to test whether each column in a data frame is within a user-defined range of values.

I would like to propose..

Example API

def flag_values_not_in_range(
        df: pd.DataFrame,
        bound: list,
        inclusive: bool = True
) -> pd.DataFrame:
    """
    :param df: data frame to test if values in columns are within a range
    :param bound: user-defined lower and upper bound of values to test in data frame columns
    :param inclusive: include boundaries in filtering.
        Defaults to True
    :return: True if value in column does not fall within range.
        False if value in column falls within range.
    """

Contributor Guide