def get_trans_prob(df, date, label, label_plus_one):
    """get probability of transition from one label to another,
    given a dataframe where rows are transitions

    Parameters
    ----------
    df : pandas.Dataframe
        returned by the make_df_trans_probs function
    date : datetime.date
        date to use to create the transition matrix.
        Must occur in the 'date' column of the dataframe
    label : str
        we want to compute the probability of
        transitioning from this label to label_plus_one
    label_plus_one : str
        label we want to compute the probability of
        transitioning to, from label_plus_one

    Returns
    -------
    p : float
        probability of transitioning from label to label_plus_one on
        the specified date, computed using the dataframe
    """
    df_date = df[df['date'] == date]
    label_count = len(df_date[df_date['label'] == label].index)
    trans_count = len(df_date[(df_date['label'] == label) & (df_date[
        'label_plus_one'] == label_plus_one)].index)
    if label_count > 0:
        p = trans_count / label_count
    else:
        p = 0.0
    return p
