def group_clusters(df, cluster_id, date_col):
    """ Use pandas to group clusters by cluster identifier
    df = pandas dataframe
    cluster_id = column that identifies cluster membership, which can
        be a basic string like "hospital cluster A"
    date_col = onset or report date column
    """
    clusters = df[df[date_col].notnull()]
    groups = clusters.groupby(clusters[cluster_id])
    return groups
