class_docstr: Wrapper for easy vectorization/iteration over instances.
  
  VectorizedDF is an iterable that returns pandas.DataFrame
      in sktime Series or Panel format.
  Elements are all Series or Panels in X, these are iterated over.
  
  Parameters
  ----------
  X : object in sktime compatible Panel or Hierarchical format
      the data container to vectorize over
  y : placeholder argument, not used currently
  is_scitype : str ("Panel", "Hierarchical") or None, default = "Panel"
      scitype of X, if known; if None, will be inferred
      provide to constructor if known to avoid superfluous checks
          Caution: will not conduct checks if provided, assumes checks done
  iterate_as : str ("Series", "Panel"), optional, default="Series
      scitype of the iteration
      for instance, if X is Panel and iterate_as is "Series"
          then the class will iterate over individual Series in X
      or, if X is Hierarchical and iterate_as is "Panel"
          then the class will iterate over individual Panels in X
              (Panel = flat/non-hierarchical collection of Series)
  iterate_cols : boolean, optional, default=False
      whether to iterate over columns, if true, the class will iterate over columns
  
  Methods
  -------
  iter(self) or self.__iter__()
      Iterates over each Series/Panel (depending on iterate_as) in X
      as pandas.DataFrame with Index or MultiIndex (in sktime pandas format)
  len(self) or self.__len__()
      returns number of Series/Panels in X
  get_iter_indices()
      Returns pandas.(Multi)Index that are iterated over
  reconstruct(self, df_list, convert_back=False)
      Takes iterable df_list and returns as an object of is_scitype.
      Used to obtain original format after applying operations to self iterated
class_docstr_tok: ["Wrapper","for","easy","vectorization\/iteration","over","instances",".","VectorizedDF","is","an","iterable","that","returns","pandas.DataFrame","in","sktime","Series","or","Panel","format",".","Elements","are","all","Series","or","Panels","in","X",",","these","are","iterated","over",".","Parameters","--","--","--","--","--","X",":","object","in","sktime","compatible","Panel","or","Hierarchical","format","the","data","container","to","vectorize","over","y",":","placeholder","argument",",","not","used","currently","is_scitype",":","str","(","``","Panel","''",",","``","Hierarchical","''",")","or","None",",","default","=","``","Panel","''","scitype","of","X",",","if","known",";","if","None",",","will","be","inferred","provide","to","constructor","if","known","to","avoid","superfluous","checks","Caution",":","will","not","conduct","checks","if","provided",",","assumes","checks","done","iterate_as",":","str","(","``","Series","''",",","``","Panel","''",")",",","optional",",","default=","''","Series","scitype","of","the","iteration","for","instance",",","if","X","is","Panel","and","iterate_as","is","``","Series","''","then","the","class","will","iterate","over","individual","Series","in","X","or",",","if","X","is","Hierarchical","and","iterate_as","is","``","Panel","''","then","the","class","will","iterate","over","individual","Panels","in","X","(","Panel","=","flat\/non-hierarchical","collection","of","Series",")","iterate_cols",":","boolean",",","optional",",","default=False","whether","to","iterate","over","columns",",","if","true",",","the","class","will","iterate","over","columns","Methods","--","--","--","-","iter","(","self",")","or","self.__iter__","(",")","Iterates","over","each","Series\/Panel","(","depending","on","iterate_as",")","in","X","as","pandas.DataFrame","with","Index","or","MultiIndex","(","in","sktime","pandas","format",")","len","(","self",")","or","self.__len__","(",")","returns","number","of","Series\/Panels","in","X","get_iter_indices","(",")","Returns","pandas",".","(","Multi",")","Index","that","are","iterated","over","reconstruct","(","self",",","df_list",",","convert_back=False",")","Takes","iterable","df_list","and","returns","as","an","object","of","is_scitype",".","Used","to","obtain","original","format","after","applying","operations","to","self","iterated"]
docstr: Iterate over (group name, column name, instance) tuples.
  
  Iteration order is "depth first" with columns being the branches and groups the
  root nodes. Groups are ordered by group keys.
  
  Row name is null if iterate_as is the same as scitype of data.
  Col name is null if iterate_cols is False.
  
  Parameters
  ----------
  iterate_as : str ("Series", "Panel"), optional, default=self.iterate_as
      scitype of the iteration
      for instance, if X is Panel and iterate_as is "Series"
          then the class will iterate over individual Series in X
      or, if X is Hierarchical and iterate_as is "Panel"
          then the class will iterate over individual Panels in X
              (Panel = flat/non-hierarchical collection of Series)
  iterate_cols : boolean, optional, default=self.iterate_cols
      whether to iterate over columns, if true, the class will iterate over
      columns
  
  Returns
  -------
  A generator returning (row index, col index, instance) tuples for vectorization.
  i-th element corresponds to i-th vectorization slice, rows first then cols
  2nd tuple element is X row sub-set to 0-th tuple element, col sub-set to 1-st
  if no sub-setting takes place for row, 0-th tuple element is None
  if no sub-setting takes place for col, 1-st tuple element is None
docstr_tok: ["Iterate","over","(","group","name",",","column","name",",","instance",")","tuples",".","Iteration","order","is","``","depth","first","''","with","columns","being","the","branches","and","groups","the","root","nodes",".","Groups","are","ordered","by","group","keys",".","Row","name","is","null","if","iterate_as","is","the","same","as","scitype","of","data",".","Col","name","is","null","if","iterate_cols","is","False",".","Parameters","--","--","--","--","--","iterate_as",":","str","(","``","Series","''",",","``","Panel","''",")",",","optional",",","default=self.iterate_as","scitype","of","the","iteration","for","instance",",","if","X","is","Panel","and","iterate_as","is","``","Series","''","then","the","class","will","iterate","over","individual","Series","in","X","or",",","if","X","is","Hierarchical","and","iterate_as","is","``","Panel","''","then","the","class","will","iterate","over","individual","Panels","in","X","(","Panel","=","flat\/non-hierarchical","collection","of","Series",")","iterate_cols",":","boolean",",","optional",",","default=self.iterate_cols","whether","to","iterate","over","columns",",","if","true",",","the","class","will","iterate","over","columns","Returns","--","--","--","-","A","generator","returning","(","row","index",",","col","index",",","instance",")","tuples","for","vectorization",".","i-th","element","corresponds","to","i-th","vectorization","slice",",","rows","first","then","cols","2nd","tuple","element","is","X","row","sub-set","to","0-th","tuple","element",",","col","sub-set","to","1-st","if","no","sub-setting","takes","place","for","row",",","0-th","tuple","element","is","None","if","no","sub-setting","takes","place","for","col",",","1-st","tuple","element","is","None"]
code: def items(self, iterate_as=None, iterate_cols=None):
      """Iterate over (group name, column name, instance) tuples.
  
      Iteration order is "depth first" with columns being the branches and groups the
      root nodes. Groups are ordered by group keys.
  
      Row name is null if iterate_as is the same as scitype of data.
      Col name is null if iterate_cols is False.
  
      Parameters
      ----------
      iterate_as : str ("Series", "Panel"), optional, default=self.iterate_as
          scitype of the iteration
          for instance, if X is Panel and iterate_as is "Series"
              then the class will iterate over individual Series in X
          or, if X is Hierarchical and iterate_as is "Panel"
              then the class will iterate over individual Panels in X
                  (Panel = flat/non-hierarchical collection of Series)
      iterate_cols : boolean, optional, default=self.iterate_cols
          whether to iterate over columns, if true, the class will iterate over
          columns
  
      Returns
      -------
      A generator returning (row index, col index, instance) tuples for vectorization.
      i-th element corresponds to i-th vectorization slice, rows first then cols
      2nd tuple element is X row sub-set to 0-th tuple element, col sub-set to 1-st
      if no sub-setting takes place for row, 0-th tuple element is None
      if no sub-setting takes place for col, 1-st tuple element is None
      """
      if iterate_as is None:
          iterate_as = self.iterate_as
      self._check_iterate_as(iterate_as)
  
      if iterate_cols is None:
          iterate_cols = self.iterate_cols
      self._check_iterate_cols(iterate_cols)
  
      def _iter_cols(inst, group_name=None):
          if iterate_cols:
              for col in inst.columns:
                  yield group_name, col, _enforce_index_freq(
                      inst[[col]]
                  )
          else:
              yield group_name, None, _enforce_index_freq(inst)
  
      iter_levels = self._iter_levels(iterate_as)
      is_self_iter = len(iter_levels) == self.X_mi_index.nlevels
  
      if is_self_iter:
          yield from _iter_cols(self.X_multiindex)
      else:
          for name, group in self.X_multiindex.groupby(
              level=iter_levels, sort=False
          ):
              yield from _iter_cols(
                  group.droplevel(iter_levels), group_name=name
              )
  
imports: import itertools
  import numpy
  import pandas
  from sktime.datatypes._check import check_is_scitype, mtype
  from sktime.datatypes._convert import convert_to
  from sktime.utils.multiindex import flatten_multiindex
  from sktime.utils.parallel import parallelize
label_desc: Use image node_id 12 for calling the VectorizedDF obj's underlying member method code with example usage: obj.items(iterate_as, iterate_cols) without return types