<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def exclude(self, col: str, val):
 """ Delete rows based on value :param col: column name :type col: str :param val: value to delete :type val: any :example: ``ds.exclude("Col 1", "value")`` """

        try:
            self.df = self.df[self.df[col] != val]
        except Exception as e:
            self.err(e, "Can not exclude rows based on value " + str(val))