title: how to extract the min value and max value from csv file using python
body: <p>i have a python script that read from csv file and append the requested columns into 2 empty list. after that i need to extract the minimum and maximum  value of the columns extracted.</p>
  
  <p><a href="https://i.stack.imgur.com/KjUj7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KjUj7.png" alt="enter image description here"></a></p>
  
  <p>i wrote this code but it seems not working be cause the result is empty .</p>
  
  <h1>code:</h1>
  
  <pre><code>import csv
  mydelimeter = csv.excel()
  mydelimeter.delimiter=";"
  myfile = open("C:/Users/test/Documents/R_projects/homework/rdu-weather-history.csv")
  myfile.readline()
  myreader=csv.reader(myfile,mydelimeter)
  mywind,mydate=[],[]
  minTemp, maxTemp = [],[]
  
  for row in myreader:
      print(row[1],row[2])
      minTemp.append(row[1])
      maxTemp.append(row[2])
  print ("min value element : ", min(minTemp))
  print ("max value element : ", min(maxTemp))
  </code></pre>