<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def append(self, vals: list, index=None):
 """ Append a row to the main dataframe :param vals: list of the row values to add :type vals: list :param index: index key, defaults to None :param index: any, optional :example: ``ds.append([0, 2, 2, 3, 4])`` """

        try:
            self.df = self.df.loc[len(self.df.index)] = vals
        except Exception as e:
            self.err(e, self.append, "Can not append row")
            return
        self.ok("Row added to dataframe")