min

min#

NestedFrame.min(exclude_nest: bool = False, numeric_only: bool = False, **kwargs)[source]#

Return the minimum value of each column as a series, including nested columns with prefix to indicate the source column.

This computes the column-wise minimum (axis=0) across base and nested columns. Row-wise minimum (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 smallest 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 minimum over the base columns

  • numeric_only (bool, default False) – Include only float, int, boolean columns.

  • **kwargs – See the documentation for pandas.DataFrame.min() for complete details on the keyword arguments accepted by min().

Return type:

pandas.Series

Examples

>>> from nested_pandas.datasets.generation import generate_data
>>> nf = generate_data(5,5, seed=1)
>>> nf_min = nf.min()
>>> nf_min
a                    0.000114
b                    0.184677
nested.t             0.547752
nested.flux          1.828828
nested.flux_error         1.0
nested.band                 g
dtype: object