def get_month_as_str_col(df, date_col):
    """Generate a pandas series of the month as a string in YYYY-MM format from the date column.

    Parameters
    ----------
    df : pandas df
        Pandas dataframe
    date_col : str
        Name of the column in the dataframe containing the timestamp

    Returns
    -------
    pandas series
        Pandas series with the month as string in YYYY-MM format
    """
    return df[date_col].dt.to_period("M").astype(str)