title: Pandas read_csv and DataFrame - How to use the data once loaded
body: <p>In executing this...</p>
  
  <pre><code> this_file = pd.read_csv(filepath, quotechar='"', error_bad_lines=False, index_col=False)
  </code></pre>
  
  <p>...I have no issues. The data is loaded fine (theoretically). However, utilizing the imported data is where I'm struggling.</p>
  
  <p>In this particular case, the CSV file is full of events (races) with one event per row etc. The result is this...</p>
  
  <pre><code> &lt;class 'pandas.core.frame.DataFrame'&gt;
   Int64Index: 50 entries, 0 to 49
   Data columns (total 43 columns):
   race_date               50  non-null values
   track_code              50  non-null values
   race_number             50  non-null values
   ...
   dtypes: float64(19), int64(7), object(17)
  </code></pre>
  
  <p>How do I read and use this data in the DataFrame?</p>
  
  <p>I've tried...</p>
  
  <pre><code> for race in this_file:
        print(race)
  </code></pre>
  
  <p>and I it returns all of the "field names."</p>
  
  <p>Doing this...</p>
  
  <pre><code> for race in this_file.iterrows():
        print(race)
  </code></pre>
  
  <p>...spits-out what seems to be tuples (?) of each row.</p>
  
  <p>Because each race triggers a variety of separate actions with other DataFrames, I'd like to get able to utilize this in a loop (as an example)...</p>
  
  <pre><code> race['race_date']
  </code></pre>
  
  <p>I'm sure this is simple, but the DataFrame read_csv produces doesn't seem to be following the examples in the book "Python for Data Analysis." Thank you!</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I need to cycle through the races (rows) in the DataFrame, grab details from columns with the current race and use that info in other areas of the software.</p>
  
  <p>So I tried this...</p>
  
  <pre><code> for race in this_file.iterrows():
        print(race['race_date'])
  </code></pre>
  
  <p>and received this error...</p>
  
  <pre><code> Traceback (most recent call last):
     File "C:\RaceTest\build_models.py", line 7, in &lt;module&gt;
       raceanalysis.build_model(dataset='small')
     File "C:\RaceTest\raceanalysis\raceanalysis.py", line 70, in build_model
       print(race['race_date'])
   TypeError: tuple indices must be integers, not str
  </code></pre>