title: AttributeError: 'builtin_function_or_method' object has no attribute 'fieldnames'
body: <p>I want to print out the first trip recorded from each of 3 cities (the second line of each data file) for bike share system. However, it prints only one city and this error keeps showing: </p>
  
  <pre><code>AttributeError: 'builtin_function_or_method' object has no attribute 'fieldnames'
  </code></pre>
  
  <p>I tried to search for the answer but I couldn't find any</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import csv 
  from datetime import datetime 
  from pprint import pprint 
  
  
  
  def print_first_point(filename):
      """
      This function prints and returns the first data point (second row) from
      a csv file that includes a header row.
      """
      # print city name for reference
      city = filename.split('-')[0].split('/')[-1]
      print('\nCity: {}'.format(city))
  
      with open(filename, 'r') as f_in:
          trip_reader = csv.DictReader(f_in)
          first_trip = csv.reader.fieldnames
          pprint(first_trip)
      # output city name and first trip for later testing
      return (city, first_trip)
  
  # list of files for each city
  data_files = ['./data/NYC-CitiBike-2016.csv',
                './data/Chicago-Divvy-2016.csv',
                './data/Washington-CapitalBikeshare-2016.csv',]
  
  # print the first trip from each file, store in dictionary
  example_trips = {}
  for data_file in data_files:
      city, first_trip = print_first_point(data_file)
      example_trips[city] = first_trip
  </code></pre>