def split_data(df_data, clusters):
    """
    Splits the given data by the given cluster assignments.

    :param pd.DataFrame df_data

    :param pd.Series[int] clusters

    :rtype: Dict[int, pd.DataFrame]
    """

    if clusters is None:

        return {0: df_data}

    return {
        k: df_data.loc[clusters.index[clusters == k]]
        for k in clusters.unique()
    }