class_docstr: Base class for interfacing prophet and neuralprophet.
class_docstr_tok: ["Base","class","for","interfacing","prophet","and","neuralprophet","."]
docstr: Conerce index of X to index expected by prophet.
docstr_tok: ["Conerce","index","of","X","to","index","expected","by","prophet","."]
code: def _convert_X_for_exog(self, X, fh):
      """Conerce index of X to index expected by prophet."""
      if X is None:
          return None
      elif isinstance(X.index, pd.PeriodIndex):
          X = X.copy()
          X = X.loc[self.fh.to_absolute_index(self.cutoff)]
          X.index = X.index.to_timestamp()
      elif pd.api.types.is_integer_dtype(X.index):
          X = X.copy()
          X = X.loc[self.fh.to_absolute(self.cutoff).to_numpy()]
          X.index = fh
      # else X is pd.DatetimeIndex as prophet expects, and needs no conversion
      else:
          X = X.loc[fh]
      return X
  
imports: import os
  import pandas
  from sktime.forecasting.base import BaseForecaster
label_desc: Use image node_id 6 for calling the _ProphetAdapter obj's underlying member method code with example usage: obj._convert_X_for_exog(X, fh) and returns: X, None