Examples
import numpy as np
import pandas as pd
df = pd.DataFrame([[3.0, 2.0],
[4.0, np.nan],
[2.0, 0.0]],
columns=list('XY'))
df
By default, iterates over rows and finds the minimum in each column:
df.cummin()
To iterate over columns and find the minimum in each row, use axis=1
df.cummin(axis=1)