class_docstr: Apply iterative differences to a timeseries.
  
  The transformation works for univariate and multivariate timeseries. However,
  the multivariate case applies the same differencing to every series.
  
  Difference transformations are applied at the specified lags in the order provided.
  
  For example, given a timeseries with monthly periodicity, using lags=[1, 12]
  corresponds to applying a standard first difference to handle trend, and
  followed by a seasonal difference (at lag 12) to attempt to account for
  seasonal dependence.
  
  To provide a higher-order difference at the same lag list the lag multiple
  times. For example, lags=[1, 1] takes iterative first differences like may
  be needed for a series that is integrated of order 2.
  
  Parameters
  ----------
  lags : int or array-like, default = 1
      The lags used to difference the data.
      If a single `int` value is
  
  na_handling : str, optional, default = "fill_zero"
      How to handle the NaNs that appear at the start of the series from differencing
      Example: there are only 3 differences in a series of length 4,
          differencing [a, b, c, d] gives [?, b-a, c-b, d-c]
          so we need to determine what happens with the "?" (= unknown value)
      "drop_na" - unknown value(s) are dropped, the series is shortened
      "keep_na" - unknown value(s) is/are replaced by NaN
      "fill_zero" - unknown value(s) is/are replaced by zero
  
  memory : str, optional, default = "all"
      how much of previously seen X to remember, for exact reconstruction of inverse
      "all" : estimator remembers all X, inverse is correct for all indices seen
      "latest" : estimator only remembers latest X necessary for future reconstruction
          inverses at any time stamps after fit are correct, but not past time stamps
      "none" : estimator does not remember any X, inverse is direct cumsum
  
  Examples
  --------
  >>> from sktime.transformations.series.difference import Differencer
  >>> from sktime.datasets import load_airline
  >>> y = load_airline()
  >>> transformer = Differencer(lags=[1, 12])
  >>> y_transform = transformer.fit_transform(y)
class_docstr_tok: ["Apply","iterative","differences","to","a","timeseries",".","The","transformation","works","for","univariate","and","multivariate","timeseries",".","However",",","the","multivariate","case","applies","the","same","differencing","to","every","series",".","Difference","transformations","are","applied","at","the","specified","lags","in","the","order","provided",".","For","example",",","given","a","timeseries","with","monthly","periodicity",",","using","lags=","[","1",",","12","]","corresponds","to","applying","a","standard","first","difference","to","handle","trend",",","and","followed","by","a","seasonal","difference","(","at","lag","12",")","to","attempt","to","account","for","seasonal","dependence",".","To","provide","a","higher-order","difference","at","the","same","lag","list","the","lag","multiple","times",".","For","example",",","lags=","[","1",",","1","]","takes","iterative","first","differences","like","may","be","needed","for","a","series","that","is","integrated","of","order","2",".","Parameters","--","--","--","--","--","lags",":","int","or","array-like",",","default","=","1","The","lags","used","to","difference","the","data",".","If","a","single","`","int","`","value","is","na_handling",":","str",",","optional",",","default","=","``","fill_zero","''","How","to","handle","the","NaNs","that","appear","at","the","start","of","the","series","from","differencing","Example",":","there","are","only","3","differences","in","a","series","of","length","4",",","differencing","[","a",",","b",",","c",",","d","]","gives","[","?",",","b-a",",","c-b",",","d-c","]","so","we","need","to","determine","what","happens","with","the","``","?","''","(","=","unknown","value",")","``","drop_na","''","-","unknown","value","(","s",")","are","dropped",",","the","series","is","shortened","``","keep_na","''","-","unknown","value","(","s",")","is\/are","replaced","by","NaN","``","fill_zero","''","-","unknown","value","(","s",")","is\/are","replaced","by","zero","memory",":","str",",","optional",",","default","=","``","all","''","how","much","of","previously","seen","X","to","remember",",","for","exact","reconstruction","of","inverse","``","all","''",":","estimator","remembers","all","X",",","inverse","is","correct","for","all","indices","seen","``","latest","''",":","estimator","only","remembers","latest","X","necessary","for","future","reconstruction","inverses","at","any","time","stamps","after","fit","are","correct",",","but","not","past","time","stamps","``","none","''",":","estimator","does","not","remember","any","X",",","inverse","is","direct","cumsum","Examples","--","--","--","--",">",">",">","from","sktime.transformations.series.difference","import","Differencer",">",">",">","from","sktime.datasets","import","load_airline",">",">",">","y","=","load_airline","(",")",">",">",">","transformer","=","Differencer","(","lags=","[","1",",","12","]",")",">",">",">","y_transform","=","transformer.fit_transform","(","y",")"]
docstr: Return testing parameter settings for the estimator.
  
  Returns
  -------
  params : dict or list of dict, default = {}
      Parameters to create testing instances of the class
      Each dict are parameters to construct an "interesting" test instance, i.e.,
      `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
      `create_test_instance` uses the first (or only) dictionary in `params`
docstr_tok: ["Return","testing","parameter","settings","for","the","estimator",".","Returns","--","--","--","-","params",":","dict","or","list","of","dict",",","default","=","{","}","Parameters","to","create","testing","instances","of","the","class","Each","dict","are","parameters","to","construct","an","``","interesting","''","test","instance",",","i.e.",",","`","MyClass","(","*","*","params",")","`","or","`","MyClass","(","*","*","params","[","i","]",")","`","creates","a","valid","test","instance",".","`","create_test_instance","`","uses","the","first","(","or","only",")","dictionary","in","`","params","`"]
code: def get_test_params(cls):
      """Return testing parameter settings for the estimator.
  
      Returns
      -------
      params : dict or list of dict, default = {}
          Parameters to create testing instances of the class
          Each dict are parameters to construct an "interesting" test instance, i.e.,
          `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
          `create_test_instance` uses the first (or only) dictionary in `params`
      """
      params = [{"na_handling": x} for x in cls.VALID_NA_HANDLING_STR]
      # we're testing that inverse_transform is inverse to transform
      #   and that is only correct if the first observation is not dropped
      # todo: ensure that we have proper tests or escapes for "incomplete inverses"
      params = params[1:]
      #   this removes "drop_na" setting where the inverse has problems
      #   need to deal with this in a better way in testing
      return params
  
imports: from typing import Union
  import numpy
  import pandas
  from sklearn.utils import check_array
  from sktime.datatypes._utilities import get_cutoff, update_data
  from sktime.transformations.base import BaseTransformer
  from sktime.utils.validation import is_int
label_desc: Use image node_id 7 for calling the Differencer obj's underlying member method code with example usage: obj.get_test_params(cls) and returns: params