def extract_month_of_daily(daily, year, month):
    """Given daily values, extract a given month

    Parameters
    ----------
    daily : DataFrame
        must of columns {'year', 'month'}

    year, month : int
        The year and month of interest

    Returns
    -------

    DataFrame
         Indexed on days from start of month.  Same columns as input
    """
    ix = (daily["month"] == month) & (daily["year"] == year)
    df = daily[ix]
    idx = [(m - df.index[0]).days for m in df.index]
    df.reset_index(inplace=True)
    df.index = idx
    return df