code: def append_row(self, index, values, new_cols=True):
          if index in self._index:
              raise IndexError('index already in DataFrame')
          if new_cols:
              for col in values:
                  if col not in self._columns:
                      self._add_column(col)
          self._index.append(index)
          for c, col in enumerate(self._columns):
              self._data[c].append(values.get(col, None))