title: How to read a specific row of a csv file in python?
body: <p>I have searched like crazy trying to find specifically how to read a row in a csv file. </p>
  
  <p>I need to read a random row out of 1000, each of which has 3 columns. The first column has an email. I need to put in a random email, and get columns 2 and 3 out. (Python 2.7, csv file) </p>
  
  <p>Example:</p>
  
  <pre class="lang-none prettyprint-override"><code>Name Date  Color
  Ray  May   Gray
  Alex Apr   Green
  Ann  Jun   Blue
  Kev  Mar   Gold
  Rob  May   Black
  </code></pre>
  
  <p>Instead of column 1 row 3, I need [Ann], her whole row. This is a CSV file, with over 1000 names. I have to put in her name and output her whole row. </p>
  
  <hr>
  
  <p>What I have tried</p>
  
  <pre><code>from collections import namedtuple
  Entry = namedtuple('Entry', 'Name, Date, Color')
  file_location = "C:/Users/abriman/Desktop/Book.csv"
  ss_dict = {}
  spreadsheet = file_location = "C:/Users/abriman/Desktop/Book.csv"
  for row in spreadsheet:
      entry = Entry(*tuple(row))
      ss_dict['Ann']
  </code></pre>
  
  <p>And my error reads</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 2, in &lt;module&gt;
  TypeError: __new__() takes exactly 4 arguments (2 given)
  </code></pre>
  
  <p>I have tried other ways too and got little to no result. I'm a beginner at python.</p>