I have a time series in a Pandas DataFrame for which I want to add a new column with the (future) minimum values. Specifically, imagine I have the following values in my time series:
VAL
1
0
4
3
2
3
4
I would like to find the minimum values "looking forward". For example, the minimum for the first 2 values is 0, then for the next three values is 2 (0 is no longer considered because, even if it's the overall minimum, it's already in the past), then 3 and finally 4.
VAL MIN
1 0
0 0
4 2
3 2
2 2
3 3
4 4
Any ideas how I can do this efficiently with Pandas or Numpy? Thanks!