title: Find Dict Values from csv.DictReader
body: <p>I'm trying to take a csv file and turn it into a dictionary, via csv.DictReader. After doing this, I want to modify one of the columns of the dictionary, and then write the data into a tsv file. I'm dealing with words and word frequencies in a text.</p>
  
  <p>I've tried using the dict.value() function to obtain the dictionary values, but I get an error message saying "AttributeError: DictReader instance has no attribute "values""</p>
  
  <p>Below is my code:</p>
  
  <pre><code>#calculate frequencies of each word in Jane Austen's "Pride and Prejudice"
  import csv
  
  #open file with words and counts for the book, and turn into dictionary
  fob = open("P&amp;P.csv", "r")
  words = csv.DictReader(fob)
  dict = words
  
  #open a file to write the words and frequencies to
  fob = open("AustenWords.tsv", "w")
  
  #set total word count
  wordcount = 120697
  
  for row in words:
      values = dict.values()
      print values
  </code></pre>
  
  <p>Basically, I have the total count of each word in the text (i.e. "a","1937") and I want to find the percentage of the total word count that the word in question uses (thus, for "a", the percentage would be 1937/120697.) Right now my code doesn't have the equation for doing this, but I'm hoping, once I obtain the values of each row, to write a row to the new file with the word and the calculated percentage. If anyone has a better way (or any way!) to do this, I would greatly appreciate any input.</p>
  
  <p>Thanks</p>