Pandas.DataFrame.cummin() Function with Example | 2019

Spread the love

DataFrame.cummin(): This function returns a DataFrame or Series of the same size containing the cumulative minimum.

Syntax: DataFrame.cummin(axis=None, skipna=True, *args, **kwargs).

Parameters:
axis : {0 or ‘index’, 1 or ‘columns’}, default 0
The index or the name of the axis. 0 is equivalent to None or ‘index’.

skipna : boolean, default True
Exclude NA/null values. If an entire row/column is NA, the result will be NA.

*args, **kwargs :
Additional keywords have no effect but might be accepted for compatibility with NumPy.

Returns:
cummin : Series or DataFrame

#python example program on pandas.dataframe.cummin() function

import numpy as np import pandas as pd df = pd.DataFrame({'A': [3,5, 2], 'B': [4, 6, 8], 'C':[9,10,11]}) print(df.cummin()) print("with axis =1\n",df.cummin(axis=1))

Output: