def _check_cols(df, col_names):
for col in col_names:<EOL><INDENT>if not hasattr(df, col):<EOL><INDENT>raise AttributeError("<STR_LIT>".format(col,<EOL>df.columns))<EOL><DEDENT><DEDENT>
Raise an AttributeError if `df` does not have a column named as an item of
    the list of strings `col_names`.