max#
- NestedFrame.max(exclude_nest: bool = False, numeric_only: bool = False, **kwargs)[source]#
Return the maximum value of each column as a series, including nested columns with prefix to indicate the source column.
This computes the column-wise maximum (axis=0) across base and nested columns. Row-wise maximum (axis=1) are not supported, as reductions along columns are the primary intended behavior for NestedFrame.
By default, missing values (NaNs) will be skipped in the computation.
For non-numeric columns (e.g., strings), the method returns the lexicographically largest value when numeric_only=False (default).
- Parameters:
exclude_nest (bool, default False) – If set to True, will exclude the nested structure and only computes the maximum over the base columns
numeric_only (bool, default False) – Include only float, int, boolean columns.
**kwargs – See the documentation for
pandas.DataFrame.max()for complete details on the keyword arguments accepted bymax().
- Return type:
Examples
>>> from nested_pandas.datasets.generation import generate_data >>> nf = generate_data(5,5, seed=1)
>>> nf_max = nf.max() >>> nf_max a 0.720324 b 1.077633 nested.t 19.365232 nested.flux 98.886109 nested.flux_error 1.0 nested.band r dtype: object
See also