docstr: When ``index=True`` is passed, an extra column will be prepended to the result series
  Thus we need to update the index of initial chunk for returned dataframe chunks
docstr_tok: ["When","``","index=True","``","is","passed",",","an","extra","column","will","be","prepended","to","the","result","series","Thus","we","need","to","update","the","index","of","initial","chunk","for","returned","dataframe","chunks"]
code: def _adapt_index(self, input_index, index=0):
      """
      When ``index=True`` is passed, an extra column will be prepended to the result series
      Thus we need to update the index of initial chunk for returned dataframe chunks
      """
      if not self.index or index != 0:
          return input_index
      idx_data = input_index.to_pandas().insert(0, "Index")
      return parse_index(idx_data, store_data=True)
  
imports: import operator
  from functools import reduce
  import numpy
  import pandas
  from ...None import opcodes
  from ...config import options
  from ...core.operand import OperandStage
  from ...serialization.serializables import BoolField, Int64Field
  from ...utils import ceildiv, lazy_import
  from ..operands import DataFrameOperand, DataFrameOperandMixin
  from ..core import IndexValue
  from ..utils import parse_index
label_desc: Use image node_id 7 for calling the DataFrameMemoryUsage obj's underlying member method code with example usage: obj._adapt_index(input_index, index) and returns: parse_index, input_index