Generate a new column name that is guaranteed not to conflict with an
    existing set of column names.

    Parameters
    ----------
    base_name : str
        The base of the new column name. Usually this does not conflict with
        the existing column names, in which case this function simply returns
        `base_name`.

    column_names : list[str]
        List of existing column names.

    Returns
    -------
    robust_name : str
        The new column name. If `base_name` isn't in `column_names`, then
        `robust_name` is the same as `base_name`. If there are conflicts, a
        numeric suffix is added to `base_name` until it no longer conflicts
        with the column names.

def _robust_column_name(base_name, column_names):
    """
    Generate a new column name that is guaranteed not to conflict with an
    existing set of column names.

    Parameters
    ----------
    base_name : str
        The base of the new column name. Usually this does not conflict with
        the existing column names, in which case this function simply returns
        `base_name`.

    column_names : list[str]
        List of existing column names.

    Returns
    -------
    robust_name : str
        The new column name. If `base_name` isn't in `column_names`, then
        `robust_name` is the same as `base_name`. If there are conflicts, a
        numeric suffix is added to `base_name` until it no longer conflicts
        with the column names.
    """
    robust_name = base_name
    i = 1

    while robust_name in column_names:
        robust_name = base_name + '.{}'.format(i)
        i += 1

    return robust_name