def quantile(self, q=<NUM_LIT:0.5>, interpolation='<STR_LIT>'):
self._check_percentile(q)<EOL>df = self.to_frame()<EOL>result = df.quantile(q=q, interpolation=interpolation,<EOL>numeric_only=False)<EOL>if result.ndim == <NUM_LIT:2>:<EOL><INDENT>result = result.iloc[:, <NUM_LIT:0>]<EOL><DEDENT>if is_list_like(q):<EOL><INDENT>result.name = self.name<EOL>return self._constructor(result,<EOL>index=Float64Index(q),<EOL>name=self.name)<EOL><DEDENT>else:<EOL><INDENT>return result.iloc[<NUM_LIT:0>]<EOL><DEDENT>
Return value at the given quantile.

Parameters
----------
q : float or array-like, default 0.5 (50% quantile)
    0 <= q <= 1, the quantile(s) to compute.
interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'}
    .. versionadded:: 0.18.0

    This optional parameter specifies the interpolation method to use,
    when the desired quantile lies between two data points `i` and `j`:

        * linear: `i + (j - i) * fraction`, where `fraction` is the
          fractional part of the index surrounded by `i` and `j`.
        * lower: `i`.
        * higher: `j`.
        * nearest: `i` or `j` whichever is nearest.
        * midpoint: (`i` + `j`) / 2.

Returns
-------
float or Series
    If ``q`` is an array, a Series will be returned where the
    index is ``q`` and the values are the quantiles, otherwise
    a float will be returned.

See Also
--------
core.window.Rolling.quantile
numpy.percentile

Examples
--------
>>> s = pd.Series([1, 2, 3, 4])
>>> s.quantile(.5)
2.5
>>> s.quantile([.25, .5, .75])
0.25    1.75
0.50    2.50
0.75    3.25
dtype: float64