class_docstr: Orchestrates a concatenation operation for BlockManagers
class_docstr_tok: ["Orchestrates","a","concatenation","operation","for","BlockManagers"]
docstr: Return index to be used along concatenation axis.
docstr_tok: ["Return","index","to","be","used","along","concatenation","axis","."]
code: def _get_concat_axis(self):
      """
      Return index to be used along concatenation axis.
      """
      if self._is_series:
          if self.axis == 0:
              indexes = [x.index for x in self.objs]
          elif self.ignore_index:
              idx = ibase.default_index(len(self.objs))
              return idx
          elif self.keys is None:
              names = [None] * len(self.objs)
              num = 0
              has_names = False
              for i, x in enumerate(self.objs):
                  if not isinstance(x, Series):
                      raise TypeError(
                          "Cannot concatenate type 'Series' "
                          "with object of type {type!r}".format(
                              type=type(x).__name__
                          )
                      )
                  if x.name is not None:
                      names[i] = x.name
                      has_names = True
                  else:
                      names[i] = num
                      num += 1
              if has_names:
                  return Index(names)
              else:
                  return ibase.default_index(len(self.objs))
          else:
              return ensure_index(self.keys).set_names(self.names)
      else:
          indexes = [x._data.axes[self.axis] for x in self.objs]
  
      if self.ignore_index:
          idx = ibase.default_index(sum(len(i) for i in indexes))
          return idx
  
      if self.keys is None:
          concat_axis = _concat_indexes(indexes)
      else:
          concat_axis = _make_concat_multiindex(
              indexes, self.keys, self.levels, self.names
          )
  
      self._maybe_check_integrity(concat_axis)
  
      return concat_axis
  
imports: import numpy
  import pandas.core.dtypes.concat
  from pandas import DataFrame, Index, MultiIndex, Series, compat
  from pandas.core import common
  from pandas.core.arrays.categorical import _factorize_from_iterable, _factorize_from_iterables
  from pandas.core.generic import NDFrame
  from pandas.core.index import _all_indexes_same, _get_consensus_names, _get_objs_combined_axis, ensure_index
  import pandas.core.indexes.base
  from pandas.core.internals import concatenate_block_managers
label_desc: Use image node_id 6 for calling the _Concatenator obj's underlying member method code with example usage: obj._get_concat_axis() and returns: concat_axis, idx, idx, ensure_index, Index, ibase