def _downsample(self, how, **kwargs):
self._set_binner()<EOL>how = self._is_cython_func(how) or how<EOL>ax = self.ax<EOL>obj = self._selected_obj<EOL>if not len(ax):<EOL><INDENT>obj = obj.copy()<EOL>obj.index.freq = self.freq<EOL>return obj<EOL><DEDENT>if ax.freq is not None or ax.inferred_freq is not None:<EOL><INDENT>if len(self.grouper.binlabels) > len(ax) and how is None:<EOL><INDENT>return self.asfreq()<EOL><DEDENT><DEDENT>result = obj.groupby(<EOL>self.grouper, axis=self.axis).aggregate(how, **kwargs)<EOL>result = self._apply_loffset(result)<EOL>return self._wrap_result(result)<EOL>
Downsample the cython defined function.

Parameters
----------
how : string / cython mapped function
**kwargs : kw args passed to how function