import warnings


def prune_df(data, columns_in):
    """
    Prune dataframe data so that only columns specified in cols remain. Delete
    the rest.

    Parameters
    ----------
    data : pandas.DataFrame
    columns_in : container (list or tuple)
                List (or tuple) of columns headers of data we want to keep

    Returns
    -------
    data : pandas.DataFrame
        The pruned dataframe that only contain columns in cols
    """
    columns = data.columns.to_list()

    for column in columns:
        if column not in columns_in:
            del data[column]
    for col in columns_in:
        if col not in columns:
            warnings.warn(f"cols={col} was not found in datatable... will be ommitted")

    return data