I am having trouble finding a way to do an efficient element-wise minimum of two Series objects in pandas. For example I can add two Series easily enough:
In
This method will do the job:
import pandas as pd def elementwise_min(x, y): x[x > y] = y return x a = pd.Series([1, 2, 3]) b = pd.Series([0, 2, 4]) elementwise_min(a, b)