def apply(self, func, columns=no_default):

        if columns is no_default:
            msg = ("columns is not specified, inferred from partial data. "
                   "Please provide columns if the result is unexpected.\n"
                   "  Before: .apply(func)\n"
                   "  After:  .apply(func, columns=['x', 'y']) for dataframe result\n"
                   "  or:     .apply(func, columns='x')        for series result")
            warnings.warn(msg)

            dummy = self._head().apply(func)
            columns = dummy.columns if isinstance(dummy, pd.DataFrame) else dummy.name
        else:
            dummy = columns
            columns = self._slice

        if isinstance(self.index, Series):
            if self.index._name == self.obj.index._name:
                df = self.obj
            else:
                df = self.obj.set_index(self.index, drop=False,
                                        **self.kwargs)

            return map_partitions(_groupby_apply_level0, dummy,
                                  df, columns, func)

        else:
            from .shuffle import shuffle
            df = shuffle(self.obj, self.index, **self.kwargs)
            return map_partitions(_groupby_apply_index, dummy,
                                  df, self.index, columns, func)
alternate: django-admin builtin commands succeed if settings are provided as argument
dataset/ETHPy150Open dask/dask/dask/dataframe/groupby.py/_GroupBy.apply--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/tests/regressiontests/admin_scripts/tests.py/DjangoAdminAlternateSettings.test_builtin_with_settings