# 5 examples of 'pandas max' in Python

Every line of 'pandas max' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

## All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
``137def max(x):138    # x == N_aug x B x N_cls (x H x W)139    return x.max(0, False).values``
``33def max(self):34    return self._max``
``60def max(self, **kwargs):61    return self.data.max(**kwargs)``
``89@plot_function90def max_(x: Union[pd.Series, List[pd.Series]], w: Union[Window, int] = Window(None, 0)) -&gt; pd.Series:91    """92    Maximum value of series over given window9394    :param x: series: a timeseries or an array of timeseries95    :param w: Window or int: size of window and ramp up to use. e.g. Window(22, 10) where 22 is the window size96              and 10 the ramp up value. Window size defaults to length of series.97    :return: timeseries of maximum value9899    **Usage**100101    Returns the maximum value of the series over each window.102103    If :math:`x` is a series:104105    :math:`R_t = max(X_{t-w+1}:X_t)`106107    where :math:`w` is the size of the rolling window.108109    If :math:`x` is an array of series:110111    :math:`R_t = max(X_{1, t-w+1}:X_{n, t})`112113    where :math:`w` is the size of the rolling window, and :math:`n` is the number of series.114115    If window is not provided, returns the maximum value over the full series. If the window size is greater than the116    available data, will return maximum of available values.117118    **Examples**119120    Maximum value of price series over the last :math:`22` observations:121122    &gt;&gt;&gt; prices = generate_series(100)123    &gt;&gt;&gt; max_(prices, 22)124125    **See also**126127    :func:`min_`128129    """130    if isinstance(x, list):131        x = pd.concat(x, axis=1).max(axis=1)132    w = normalize_window(x, w)133    assert x.index.is_monotonic_increasing, "series index is monotonic increasing"134    if isinstance(w.w, pd.DateOffset):135        values = [x.loc[(x.index &gt; idx - w.w) &amp; (x.index &lt;= idx)].max() for idx in x.index]136        return apply_ramp(pd.Series(values, index=x.index, dtype=np.dtype(float)), w)137    else:138        return apply_ramp(x.rolling(w.w, 0).max(), w)``
``90def max(self):91    self._entry()92    res = self._rdd.max()93    return res``