Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas
- pandas.__file__
- from pandas.core import window as rwindow
- @Appender(rwindow.rolling.__doc__)
- def rolling(self, window, min_periods=None, freq=None, center=False,
- win_type=None, on=None, axis=0, closed=None):
- axis = self._get_axis_number(axis)
- return rwindow.rolling(self, window=window,
- min_periods=min_periods, freq=freq,
- center=center, win_type=win_type,
- on=on, axis=axis, closed=closed)
- def rolling(obj, win_type=None, **kwds):
- from pandas import Series, DataFrame
- if not isinstance(obj, (Series, DataFrame)):
- raise TypeError('invalid type: %s' % type(obj))
- if win_type is not None:
- return Window(obj, win_type=win_type, **kwds)
- return Rolling(obj, **kwds)
Add Comment
Please, Sign In to add comment