def assign_to_cluster(observation, cluster_centers):
    """ Assign an observation to a cluster.

    Input:
        observation (array):
        cluster_centers (pd.DataFrame):
    Returns:
        index (int): Cluster assignment for the observation.
    """
    return (cluster_centers.subtract(observation, axis=0) ** 2).sum().idxmin()
