title: How to find corresponding value python
body: <p>So my values look something like this (in csv file):</p>
  
  <pre><code>   162,100522,19010101,  -31,    0
  
     162,100522,19010102,  -13,    0
  
     162,100522,19010103,   -5,    0
  
     162,100522,19010104,  -10,    0
  
     162,100522,19010105,  -18,    0
  
  
     162,100522,19010106,  -78,    0
  
     162,100522,19010107,  -66,    0
  
     162,100522,19010108,   -6,    0
  
     162,100522,19010109,   42,    0
  </code></pre>
  
  <p>the 19010101 is the date,  1st of January 1901</p>
  
  <p>and the -31 would be the max or min temperature.</p>
  
  <p>I need to find the dates for the highest and lowest temperature</p>
  
  <p>I tried </p>
  
  <pre><code>data["DATE"][data["TX"].max()]
  </code></pre>
  
  <p>but it didnt work... I know I can find the max with data["TX"].max() and min with data["TX"].min(), but how do I find the corresponding date with the max and min temperature? Maybe with enumerate?</p>