class_docstr: Mixin class with utilities for by-column applicates.
docstr: Convert integer indices if necessary.
docstr_tok: ["Convert","integer","indices","if","necessary","."]
code: def _get_indices(self, y, idx):
      """Convert integer indices if necessary."""
      if hasattr(y, "columns"):
          y = y.columns
  
      def _get_index(y, ix):
          # deal with numpy int by coercing to python int
          if np.issubdtype(type(ix), np.integer):
              ix = int(ix)
  
          if isinstance(ix, int) and ix not in y and ix < len(y):
              return y[ix]
          else:
              return ix
  
      if isinstance(idx, (list, tuple)):
          return [self._get_indices(y, ix) for ix in idx]
      else:
          return _get_index(y, idx)
  
imports: from inspect import isclass
  import numpy
  import pandas
  from sktime.base import BaseEstimator
label_desc: Use image node_id 2 for calling the _ColumnEstimator obj's underlying member method code with example usage: obj._get_indices(y, idx) and returns: unknown, _get_index, y, ix