def fit(self, df, disable_seasonal_features=True):
        """Fit the AutoARIMAProphet adapter.

        Parameters
        ----------
        df : pandas.DataFrame
            DataFrame with columns ds (date type) and y, the time series.
        disable_seasonal_features : bool (default=True)
            Disable Prophet's seasonal features.

        Returns
        -------
        AutoARIMAProphet
            Adapter object with `AutoARIMA` fitted model.
        """
        if self.history is not None:
            raise Exception(
                "Prophet object can only be fit once. " "Instantiate a new object."
            )
        if ("ds" not in df) or ("y" not in df):
            raise ValueError(
                'Dataframe must have columns "ds" and "y" with the dates and '
                "values respectively."
            )
        history = df[df["y"].notnull()].copy()
        if history.shape[0] < 2:
            raise ValueError("Dataframe has less than 2 non-NaN rows.")
        self.history_dates = pd.to_datetime(
            pd.Series(df["ds"].unique(), name="ds")
        ).sort_values()

        history = self.setup_dataframe(history, initialize_scales=True)
        self.history = history
        self.set_auto_seasonalities()
        seasonal_features, prior_scales, component_cols, modes = (
            self.make_all_seasonality_features(history)
        )
        self.train_component_cols = component_cols
        self.component_modes = modes
        if disable_seasonal_features:
            seas = tuple(self.seasonalities.keys())
            seasonal_features = seasonal_features.loc[
                :, ~seasonal_features.columns.str.startswith(seas)
            ]
        self.xreg_cols = seasonal_features.columns

        y = history["y"].values
        X = seasonal_features.values if not seasonal_features.empty else None
        self.arima = self.arima.fit(y=y, X=X)

        return self
Fit the AutoARIMAProphet adapter.

        Parameters
        ----------
        df : pandas.DataFrame
            DataFrame with columns ds (date type) and y, the time series.
        disable_seasonal_features : bool (default=True)
            Disable Prophet's seasonal features.

        Returns
        -------
        AutoARIMAProphet
            Adapter object with `AutoARIMA` fitted model.
        
python/statsforecast/adapters/prophet.py