def confidence_interval(data, column_name, confidence_level):
    """
    get a 95% confidence interval from a bootstrap dataframe column

    Parameters
    ----------
    data : pandas dataframe
        the bootstrap dataframe generated by :py:func:`.bootstrapLE`

    column_name : string
        the statistic that you want the interval for, specified by the name of the column
        containing it

    confidence_level : float
        a real number between 0 and 1 that represents the desired confidence level.
        eg. 0.95 for 95%.

    Returns
    ----------
    list
        a two-element list with the lower bound and upper bound.

    """
    results = data[column_name].tolist()
    results.sort()
    lower_bound = int((1 - confidence_level) / 2 * len(results)) - 1
    upper_bound = int((confidence_level + 1) / 2 * len(results)) - 1
    if lower_bound < 0:
        lower_bound = 0
    return [round(float(results[lower_bound]), 1), round(float(results[upper_bound]), 1)]