code: def aggregate(self, f):
          
          if self._can_use_new_school() and f == pd.Series.kurtosis:
              self._prep_spark_sql_groupby()
              import custom_functions as CF
              return self._use_aggregation(CF.kurtosis)
          else:
              self._prep_pandas_groupby()
              return DataFrame.fromDataFrameRDD(
                  self._regroup_mergedRDD().values().map(
                      lambda g: g.aggregate(f)), self.sql_ctx)
docs: Apply the aggregation function.
          Note: This implementation does note take advantage of partial
          aggregation unless we have one of the special cases.
          Currently the only special case is Series.kurtosis - and even
          that doesn't properly do partial aggregations, but we can improve
          it to do this eventually!