def find_one_row(substr, df, col_name):
    """ Return one row from `df`. The returned row has in `col_name` column
    a value with a sub-string as `substr.

    Raise KeyError if no row is found.
    """
    for name in df[col_name]:
        if substr.lower() in name.lower():
            return df[df[col_name] == name]

    raise KeyError("Could not find {} in the " "pandas dataframe.".format(substr))