def get_series_label(df, id_col, target_col):
    """
    Gets the label for a series
    Parameters
    ----------
    df: object
        dataframe from which to extract labels
    id_col: str
        column to group by
    target_col: str
        label column

    Returns
    -------
    For each group whether at least one label was positive or not
    """
    return df.groupby(id_col, sort=False).apply(lambda group: (group[target_col] == 1).any())