def get_translator(trans_enum):
    """Make a function which uses an enum to translate a dataframe column."""
    def code_translator(df, col_name, post_proc_func=None):
        """Replace codes with names in the :obj:`pandas.DataFrame` column.

        Args:
            df (:obj:`pandas.DataFrame`): Datafame containing column to
                convert.
            col_name (str): Name of the column to convert.
            post_proc_func (function, optional): Function to apply to each
                enum member name after it's been used to replace a codes in
                the column.
        """
        df.loc[:,col_name] = df[col_name].apply(lambda x: trans_enum(x).alias)
        if post_proc_func:
            df.loc[:,col_name] = df[col_name].apply(post_proc_func)
        return df
    return code_translator