title: Python: find position of element in array
body: <p>I have a CSV containing weather data like max and min temperatures, precipitation, longitude and latitude of the weather stations etc. Each category of data is stored in a single column. </p>
  
  <p>I want to find the location of the maximum and minimum temperatures. Finding the max or min is easy:
  numpy.min(my_temperatures_column)</p>
  
  <p>How can I find the position of where the min or max is located, so I can find the latitude and longitude?</p>
  
  <p>Here is my attempt: </p>
  
  <pre><code>def coldest_location(data):
  
  coldest_temp= numpy.min(mean_temp)
  
      for i in mean_temp:
           if mean_temp[i] == -24.6:
              print i
  </code></pre>
  
  <blockquote>
    <p>Error: List indices must be int</p>
  </blockquote>
  
  <p>I saved each of the columns of my CSV into variables, so they are all individual lists.</p>
  
  <pre><code>lat          = [row[0] for row in weather_data]  # latitude
  long         = [row[1] for row in weather_data]  # longitude
  mean_temp    = [row[2] for row in weather_data]  # mean temperature 
  </code></pre>
  
  <p>I have resolved the problem as per the suggestion list.index(x)</p>
  
  <pre><code>mean_temp.index(coldest_temp) 
  
  coldest_location=[long[5],lat[5]] 
  </code></pre>
  
  <p>Unsure if asking a second question within a question is proper, but what if there are two locations with the same minimum temperature? How could I find both and their indices? </p>