title: find the value of a column that is next to the max value in a pandas df
body: <p>I am struggling with a problem. I have a pandas df that contains X,Y coordinates from different players. I can get the max X-coordinate value of the row with <code>.max(axis = 1)</code>. </p>
  
  <p>What I hoping to achieve is to make a new column that contains the value that's next to the max value. That is, how do I find the adjacent value of the max X-coordinate column. So it would be the Y-coordinate that's next to the Max X-coordinate for any given row.</p>
  
  <p>Note: There will never to duplicate max values.</p>
  
  <p>See below for example.</p>
  
  <pre><code>df
  Player 1_X  Player 1_Y  Player 2_X  Player 2_Y  Player 3_X  Player 3_Y
  6           7           5           8           **9**       3
  5           7           6           7           **8**       2
  4           6           **7**       7             6         1 
  </code></pre>
  
  <p>Intended df:</p>
  
  <pre><code>df1
  Player 1_X  Player 1_Y  Player 2_X  Player 2_Y  Player 3_X  Player 3_Y New Column 
  6           7           5           8           9           3          3
  5           7           4           7           8           2          2
  4           7           5           7           6           1          7
  </code></pre>
  
  <p>I have tried an if statement and where function but don't know were to begin as I'm new to python.</p>