title: How to read a specific row in a CSV File in Python
body: <p>I have searched for the last few days to try and find help for this and have found nothing. </p>
  
  <p>I am studying A Level computer science at the moment. The project is a currency converter and I was wondering how to have a user input a currency code and then have program take this information and compare it to a CSV file. If the currency code is in the file I then need for the program to take a conversion rate that matches the currency code from the input and use this in a sum/equation to complete the conversion. I have tried a few different ways to try and implement a CSV file but i can't seem to get it to work.</p>
  
  <p>I am using Python 3.5.2</p>
  
  <p>I'm not asking for the entire code just for some examples of how to implement such a CSV file.</p>
  
  <p>This is an example of one of my CSV files:</p>
  
  <pre><code>Currency,        Code,  Rate
  Canadian Dollar, CAD,   1.3457
  Swiss Franc,     CHF,   1.0129
  British Pounds,  GBP,   0.8056
  Japanese Yen,    JPY,   111.52
  Bitcoin,         BTC,   0.001351
  </code></pre>
  
  <p>My first program used if, elif and else statements to achieve the conversion however because I finished the task so early I was told to use a CSV File instead.</p>
  
  <p>This was the initial code:</p>
  
  <pre><code>def Amount_Input():
      while True:
          try:
              global amount
              amount = float(input("Enter amount to be converted:"))
              Currency_From()
              break
          except ValueError:
              print("Invalid Entry, Please enter a valid entry as a decimal number.")
              continue
  
  
  def Currency_From():
      currencyInput1 = input("Enter the currency you wish to convert from:")
      if currencyInput1 in ['USD', 'usd']:
          USD()
      elif currencyInput1 in ['GBP', 'gbp']:
          GBP()
      elif currencyInput1 in ['EUR', 'eur']:
          EUR()
      elif currencyInput1 in ['BTC', 'btc']:
          BTC()
      else:
          print("Invalid entry")
          Currency_From()
  
  
  def USD():
      currencyInput2 = input("Enter the currency you want to convert to:")
      if currencyInput2 in ['GBP', 'gbp']:
          print("You are converting", amount, "USD to GBP.")
          converted_amount = amount*0.81
          print(converted_amount)
      elif currencyInput2 in ['EUR', 'eur']:
          print("You are converting", amount, "USD to EUR.")
          converted_amount = amount*0.94
          print(converted_amount)
      elif currencyInput2 in ['BTC', 'btc']:
          print("You are converting", amount, "USD to BTC.")
          converted_amount = amount*0.0013
          print(converted_amount)
      else:
          print("Invalid Entry")
          USD()
  
  
  def GBP():
      currencyInput2 = input("Enter the currency you want to convert to:")
      if currencyInput2 in ['USD', 'usd']:
          print("You are converting", amount, "GBP to USD.")
          converted_amount = amount*1.24
          print(converted_amount)
      elif currencyInput2 in ['EUR', 'eur']:
          print("You are converting", amount, "GBP to EUR.")
          converted_amount = amount*1.17
          print(converted_amount)
      elif currencyInput2 in ['BTC', 'btc']:
          print("You are converting", amount, "GBP to BTC.")
          converted_amount = amount*0.0017
          print(converted_amount)
      else:
          print("Invalid Entry")
          GBP()
  
  
  def EUR():
      currencyInput2 = input("Enter the currency you want to convert to:")
      if currencyInput2 in ['USD', 'usd']:
          print("You are converting", amount, "EUR to USD.")
          converted_amount = amount*1.06
          print(converted_amount)
      elif currencyInput2 in ['GBP', 'gbp']:
          print("You are converting", amount, "EUR to GBP.")
          converted_amount = amount*0.85
          print(converted_amount)
      elif currencyInput2 in ['BTC', 'btc']:
          print("You are converting", amount, "EUR to USD.")
          converted_amount = amount*0.0014
          print(converted_amount)
      else:
          print("Invalid Entry")
          EUR()
  
  
  def BTC():
      currencyInput2 = input("Enter the currency you want to convert to:")
      if currencyInput2 in ['USD', 'usd']:
          print("You are converting", amount, "BTC to USD.")
          converted_amount = amount*746.20
          print(converted_amount)
      elif currencyInput2 in ['GBP', 'gbp']:
          print("You are converting", amount, "BTC to GBP.")
          converted_amount = amount*600.89
          print(converted_amount)
      elif currencyInput2 in ['EUR', 'eur']:
          print("You are converting", amount, "BTC to EUR.")
          converted_amount = amount*704.36
          print(converted_amount)
      else:
          print("Invalid Entry")
          BTC()
  
  
  print(Amount_Input())
  </code></pre>