def _fill(self, direction, limit=None):
<EOL>if limit is None:<EOL><INDENT>limit = -<NUM_LIT:1><EOL><DEDENT>return self._get_cythonized_result('<STR_LIT>',<EOL>self.grouper, needs_mask=True,<EOL>cython_dtype=np.int64,<EOL>result_is_index=True,<EOL>direction=direction, limit=limit)<EOL>
Shared function for `pad` and `backfill` to call Cython method.

Parameters
----------
direction : {'ffill', 'bfill'}
    Direction passed to underlying Cython function. `bfill` will cause
    values to be filled backwards. `ffill` and any other values will
    default to a forward fill
limit : int, default None
    Maximum number of consecutive values to fill. If `None`, this
    method will convert to -1 prior to passing to Cython

Returns
-------
`Series` or `DataFrame` with filled values

See Also
--------
pad
backfill