def quantile_df(self, quantile=0.5) -> pd.DataFrame:
        """
        Return a Pandas DataFrame containing the single desired quantile of each component (over the samples).

        Each of the series components will appear as a column in the DataFrame. The column will be named
        "<component>_X", where "<component>" is the column name corresponding to this component, and "X"
        is the quantile value.
        The quantile columns represent the marginal distributions of the components of this series.

        This works only on stochastic series (i.e., with more than 1 sample)

        Parameters
        ----------
        quantile
            The desired quantile value. The value must be represented as a fraction
            (between 0 and 1 inclusive). For instance, `0.5` will return a DataFrame
            containing the median of the (marginal) distribution of each component.

        Returns
        -------
        pandas.DataFrame
            The Pandas DataFrame containing the desired quantile for each component.
        """
        self._assert_stochastic()
        raise_if_not(
            0 <= quantile <= 1,
            "The quantile values must be expressed as fraction (between 0 and 1 inclusive).",
            logger,
        )

        # column names
        cnames = [s + f"_{quantile}" for s in self.columns]

        return pd.DataFrame(
            self._xa.quantile(q=quantile, dim=DIMS[2]),
            index=self._time_index,
            columns=cnames,
        )

        Return a Pandas DataFrame containing the single desired quantile of each component (over the samples).

        Each of the series components will appear as a column in the DataFrame. The column will be named
        "<component>_X", where "<component>" is the column name corresponding to this component, and "X"
        is the quantile value.
        The quantile columns represent the marginal distributions of the components of this series.

        This works only on stochastic series (i.e., with more than 1 sample)

        Parameters
        ----------
        quantile
            The desired quantile value. The value must be represented as a fraction
            (between 0 and 1 inclusive). For instance, `0.5` will return a DataFrame
            containing the median of the (marginal) distribution of each component.

        Returns
        -------
        pandas.DataFrame
            The Pandas DataFrame containing the desired quantile for each component.
        
darts/timeseries.py