def quantile(self, q: Union[(float, Iterable[float])]=0.5, axis: Axis=0, numeric_only: bool=True, accuracy: int=10000) -> DataFrameOrSeries:
    "\n        Return value at the given quantile.\n\n        .. note:: Unlike pandas', the quantile in pandas-on-Spark is an approximated quantile\n            based upon approximate percentile computation because computing quantile across a\n            large dataset is extremely expensive.\n\n        Parameters\n        ----------\n        q : float or array-like, default 0.5 (50% quantile)\n            0 <= q <= 1, the quantile(s) to compute.\n        axis : int or str, default 0 or 'index'\n            Can only be set to 0 at the moment.\n        numeric_only : bool, default True\n            If False, the quantile of datetime and timedelta data will be computed as well.\n            Can only be set to True at the moment.\n        accuracy : int, optional\n            Default accuracy of approximation. Larger value means better accuracy.\n            The relative error can be deduced by 1.0 / accuracy.\n\n        Returns\n        -------\n        Series or DataFrame\n            If q is an array, a DataFrame will be returned where the\n            index is q, the columns are the columns of self, and the values are the quantiles.\n            If q is a float, a Series will be returned where the\n            index is the columns of self and the values are the quantiles.\n\n        Examples\n        --------\n        >>> psdf = ps.DataFrame({'a': [1, 2, 3, 4, 5], 'b': [6, 7, 8, 9, 0]})\n        >>> psdf\n           a  b\n        0  1  6\n        1  2  7\n        2  3  8\n        3  4  9\n        4  5  0\n\n        >>> psdf.quantile(.5)\n        a    3.0\n        b    7.0\n        Name: 0.5, dtype: float64\n\n        >>> psdf.quantile([.25, .5, .75])\n                a    b\n        0.25  2.0  6.0\n        0.50  3.0  7.0\n        0.75  4.0  8.0\n        "
    axis = validate_axis(axis)
    if (axis != 0):
        raise NotImplementedError('axis should be either 0 or "index" currently.')
    if (not isinstance(accuracy, int)):
        raise TypeError(('accuracy must be an integer; however, got [%s]' % type(accuracy).__name__))
    qq: Union[(float, List[float])] = (list(q) if isinstance(q, Iterable) else q)
    for v in (qq if isinstance(qq, list) else [qq]):
        if (not isinstance(v, float)):
            raise TypeError(('q must be a float or an array of floats; however, [%s] found.' % type(v)))
        if ((v < 0.0) or (v > 1.0)):
            raise ValueError('percentiles should all be in the interval [0, 1].')

    def quantile(psser: 'Series') -> Column:
        spark_type = psser.spark.data_type
        spark_column = psser.spark.column
        if isinstance(spark_type, (BooleanType, NumericType)):
            return F.percentile_approx(spark_column.cast(DoubleType()), qq, accuracy)
        else:
            raise TypeError('Could not convert {} ({}) to numeric'.format(spark_type_to_pandas_dtype(spark_type), spark_type.simpleString()))
    if isinstance(qq, list):
        percentile_cols: List[Column] = []
        percentile_col_names: List[str] = []
        column_labels: List[Label] = []
        for (label, column) in zip(self._internal.column_labels, self._internal.data_spark_column_names):
            psser = self._psser_for(label)
            is_numeric_or_boolean = isinstance(psser.spark.data_type, (NumericType, BooleanType))
            keep_column = ((not numeric_only) or is_numeric_or_boolean)
            if keep_column:
                percentile_col = quantile(psser)
                percentile_cols.append(percentile_col.alias(column))
                percentile_col_names.append(column)
                column_labels.append(label)
        if (len(percentile_cols) == 0):
            return DataFrame(index=qq)
        sdf = self._internal.spark_frame.select(percentile_cols)
        cols_dict: Dict[(str, List[Column])] = {}
        for column in percentile_col_names:
            cols_dict[column] = list()
            for i in range(len(qq)):
                cols_dict[column].append(scol_for(sdf, column)[i].alias(column))
        internal_index_column = SPARK_DEFAULT_INDEX_NAME
        cols = []
        for (i, col) in enumerate(zip(*cols_dict.values())):
            cols.append(F.struct(SF.lit(qq[i]).alias(internal_index_column), *col))
        sdf = sdf.select(F.array(*cols).alias('arrays'))
        sdf = sdf.select(F.explode(F.col('arrays'))).selectExpr('col.*')
        internal = InternalFrame(spark_frame=sdf, index_spark_columns=[scol_for(sdf, internal_index_column)], column_labels=column_labels, data_spark_columns=[scol_for(sdf, col) for col in percentile_col_names])
        return DataFrame(internal)
    else:
        return self._reduce_for_stat_function(quantile, name='quantile', numeric_only=numeric_only).rename(qq)
Return value at the given quantile.

.. note:: Unlike pandas', the quantile in pandas-on-Spark is an approximated quantile
    based upon approximate percentile computation because computing quantile across a
    large dataset is extremely expensive.

Parameters
----------
q : float or array-like, default 0.5 (50% quantile)
    0 <= q <= 1, the quantile(s) to compute.
axis : int or str, default 0 or 'index'
    Can only be set to 0 at the moment.
numeric_only : bool, default True
    If False, the quantile of datetime and timedelta data will be computed as well.
    Can only be set to True at the moment.
accuracy : int, optional
    Default accuracy of approximation. Larger value means better accuracy.
    The relative error can be deduced by 1.0 / accuracy.

Returns
-------
Series or DataFrame
    If q is an array, a DataFrame will be returned where the
    index is q, the columns are the columns of self, and the values are the quantiles.
    If q is a float, a Series will be returned where the
    index is the columns of self and the values are the quantiles.

Examples
--------
>>> psdf = ps.DataFrame({'a': [1, 2, 3, 4, 5], 'b': [6, 7, 8, 9, 0]})
>>> psdf
   a  b
0  1  6
1  2  7
2  3  8
3  4  9
4  5  0

>>> psdf.quantile(.5)
a    3.0
b    7.0
Name: 0.5, dtype: float64

>>> psdf.quantile([.25, .5, .75])
        a    b
0.25  2.0  6.0
0.50  3.0  7.0
0.75  4.0  8.0
def quantile(self, q: Union[(float, Iterable[float])]=0.5, axis: Axis=0, numeric_only: bool=True, accuracy: int=10000) -> DataFrameOrSeries:
    "\n        Return value at the given quantile.\n\n        .. note:: Unlike pandas', the quantile in pandas-on-Spark is an approximated quantile\n            based upon approximate percentile computation because computing quantile across a\n            large dataset is extremely expensive.\n\n        Parameters\n        ----------\n        q : float or array-like, default 0.5 (50% quantile)\n            0 <= q <= 1, the quantile(s) to compute.\n        axis : int or str, default 0 or 'index'\n            Can only be set to 0 at the moment.\n        numeric_only : bool, default True\n            If False, the quantile of datetime and timedelta data will be computed as well.\n            Can only be set to True at the moment.\n        accuracy : int, optional\n            Default accuracy of approximation. Larger value means better accuracy.\n            The relative error can be deduced by 1.0 / accuracy.\n\n        Returns\n        -------\n        Series or DataFrame\n            If q is an array, a DataFrame will be returned where the\n            index is q, the columns are the columns of self, and the values are the quantiles.\n            If q is a float, a Series will be returned where the\n            index is the columns of self and the values are the quantiles.\n\n        Examples\n        --------\n        >>> psdf = ps.DataFrame({'a': [1, 2, 3, 4, 5], 'b': [6, 7, 8, 9, 0]})\n        >>> psdf\n           a  b\n        0  1  6\n        1  2  7\n        2  3  8\n        3  4  9\n        4  5  0\n\n        >>> psdf.quantile(.5)\n        a    3.0\n        b    7.0\n        Name: 0.5, dtype: float64\n\n        >>> psdf.quantile([.25, .5, .75])\n                a    b\n        0.25  2.0  6.0\n        0.50  3.0  7.0\n        0.75  4.0  8.0\n        "
    axis = validate_axis(axis)
    if (axis != 0):
        raise NotImplementedError('axis should be either 0 or "index" currently.')
    if (not isinstance(accuracy, int)):
        raise TypeError(('accuracy must be an integer; however, got [%s]' % type(accuracy).__name__))
    qq: Union[(float, List[float])] = (list(q) if isinstance(q, Iterable) else q)
    for v in (qq if isinstance(qq, list) else [qq]):
        if (not isinstance(v, float)):
            raise TypeError(('q must be a float or an array of floats; however, [%s] found.' % type(v)))
        if ((v < 0.0) or (v > 1.0)):
            raise ValueError('percentiles should all be in the interval [0, 1].')

    def quantile(psser: 'Series') -> Column:
        spark_type = psser.spark.data_type
        spark_column = psser.spark.column
        if isinstance(spark_type, (BooleanType, NumericType)):
            return F.percentile_approx(spark_column.cast(DoubleType()), qq, accuracy)
        else:
            raise TypeError('Could not convert {} ({}) to numeric'.format(spark_type_to_pandas_dtype(spark_type), spark_type.simpleString()))
    if isinstance(qq, list):
        percentile_cols: List[Column] = []
        percentile_col_names: List[str] = []
        column_labels: List[Label] = []
        for (label, column) in zip(self._internal.column_labels, self._internal.data_spark_column_names):
            psser = self._psser_for(label)
            is_numeric_or_boolean = isinstance(psser.spark.data_type, (NumericType, BooleanType))
            keep_column = ((not numeric_only) or is_numeric_or_boolean)
            if keep_column:
                percentile_col = quantile(psser)
                percentile_cols.append(percentile_col.alias(column))
                percentile_col_names.append(column)
                column_labels.append(label)
        if (len(percentile_cols) == 0):
            return DataFrame(index=qq)
        sdf = self._internal.spark_frame.select(percentile_cols)
        cols_dict: Dict[(str, List[Column])] = {}
        for column in percentile_col_names:
            cols_dict[column] = list()
            for i in range(len(qq)):
                cols_dict[column].append(scol_for(sdf, column)[i].alias(column))
        internal_index_column = SPARK_DEFAULT_INDEX_NAME
        cols = []
        for (i, col) in enumerate(zip(*cols_dict.values())):
            cols.append(F.struct(SF.lit(qq[i]).alias(internal_index_column), *col))
        sdf = sdf.select(F.array(*cols).alias('arrays'))
        sdf = sdf.select(F.explode(F.col('arrays'))).selectExpr('col.*')
        internal = InternalFrame(spark_frame=sdf, index_spark_columns=[scol_for(sdf, internal_index_column)], column_labels=column_labels, data_spark_columns=[scol_for(sdf, col) for col in percentile_col_names])
        return DataFrame(internal)
    else:
        return self._reduce_for_stat_function(quantile, name='quantile', numeric_only=numeric_only).rename(qq)