parameters: (self)
docstring: Validate & return window frequency.
docstring_summary: Validate & return window frequency.
docstring_tokens: Validate & return window frequency .
function: def _validate_freq(self):
          """
          Validate & return window frequency.
          """
          from pandas.tseries.frequencies import to_offset
  
          try:
              return to_offset(self.window)
          except (TypeError, ValueError):
              raise ValueError(
                  f"passed window {self.window} is not "
                  "compatible with a datetimelike "
                  "index"
              )
function_tokens: def _validate_freq ( self ) : from pandas . tseries . frequencies import to_offset try : return to_offset ( self . window ) except ( TypeError , ValueError ) : raise ValueError ( f"passed window {self.window} is not " "compatible with a datetimelike " "index" )