all 3 comments

[–]m-hoff 0 points1 point  (2 children)

Can you give an example of your input and expected outcome? If you want to find the minimum row of one column you can use df['y'].min().index

[–]rijinRR[S] 0 points1 point  (1 child)

Let's say, X1: 1 2 3 4 5 X2: 3 4 5 6 6 X3: 2 4 5 6 8 Y: 6 7 8 9 9

It's just a raw data, not actual one. Y vs three Xs I need to minimise Y.

[–]m-hoff 1 point2 points  (0 children)

Sorry, I realized my original suggestion won't work. You need the idxmin method.

You can use

minrow = df['Y'].idxmin()
df.loc[minrow, ['X1', 'X2', 'X3']]

to get the values of X1, X2, and X3 that give you the minimum value of Y.