code: def applyFunction(self, func):
          
          assert callable(func), "function {} is not callable".format(func)
          self.layoutAboutToBeChanged.emit()
          df = func(self._dataFrame)
          assert isinstance(df, pandas.DataFrame), "function {} did not return a DataFrame.".format(func.__name__)
          self._dataFrame = df
          self.layoutChanged.emit()
          self.dataChanged.emit()
          self.dataFrameChanged.emit()
docs: Applies a function to the dataFrame with appropriate signals.
          The function must return a dataframe.
          :param func: A function (or partial function) that accepts a dataframe as the first argument.
          :return: None
          :raise:
              AssertionError if the func is not callable.
              AssertionError if the func does not return a DataFrame.