0

I have a dataframe which looks like

o0    v0   o1     v1      o3     v3
 -      -    -    -     2000    7   
103   2200  91    0     88      0
140   300   137  2200   131    2200
150   300   142  0      140    300
161   200   159  200    157     200
170   200   167  0       161    200
 -     -     173  200      187  300

Now . in this data-frame, Here I am trying to get the lowest value from these three values .By default offset_0 is always going to be the lowest.

Here following is the thing that I have tried

df_out["start"] = df_out['offset_0'].combine(df_out['offset_2'], lambda x1, x2: x2 if np.isnan(x1) else x1 )

Here it is only checking the 0 and 2 and not the third one. so How do I add the offset 3 as well ?

So output would be

start
 7
103
118
132
139
ganesh kaspate
  • 1
  • 9
  • 41
  • 88

0 Answers0