class_docstr: Provides rolling window calculations.
class_docstr_tok: ["Provides","rolling","window","calculations","."]
code: def __init__(
      self,
      obj,
      window=None,
      min_periods=None,
      center=False,
      win_type=None,
      axis=no_default,
  ):
      self.obj = obj  # dataframe or series
      self.window = window
      self.min_periods = min_periods
      self.center = center
      self.axis = axis
      self.win_type = win_type
      # Allow pandas to raise if appropriate
      obj._meta.rolling(**self._rolling_kwargs())
      # Using .rolling(window='2s'), pandas will convert the
      # offset str to a window in nanoseconds. But pandas doesn't
      # accept the integer window with win_type='freq', so we store
      # that information here.
      # See https://github.com/pandas-dev/pandas/issues/15969
      self._win_type = None if isinstance(self.window, int) else "freq"
  
      if self.axis in ("index", 1, "rows"):
          warnings.warn(
              "Using axis=1 in Rolling has been deprecated and will be removed "
              "in a future version.",
              FutureWarning,
          )
  
imports: from __future__ import annotations
  import datetime
  import warnings
  from numbers import Integral
  import pandas
  from pandas.api.types import is_datetime64_any_dtype
  from pandas.core.window import Rolling
  from dask.array.core import normalize_arg
  from dask.base import tokenize
  from dask.blockwise import BlockwiseDepDict
  from dask.dataframe import methods
  from dask.dataframe._compat import check_axis_keyword_deprecation
  from dask.dataframe.core import Scalar, _Frame, _get_divisions_map_partitions, _get_meta_map_partitions, _maybe_from_pandas, apply_and_enforce, new_dd_object, partitionwise_graph
  from dask.dataframe.io import from_pandas
  from dask.dataframe.multi import _maybe_align_partitions
  from dask.dataframe.utils import insert_meta_param_description, is_dask_collection, is_dataframe_like, is_series_like
  from dask.delayed import unpack_collections
  from dask.highlevelgraph import HighLevelGraph
  from dask.typing import no_default
  from dask.utils import M, apply, derived_from, funcname, has_keyword
label_desc: Use image node_id 1 to create a new Rolling object  with example: obj = Rolling(obj, window, min_periods, center, win_type, axis)