title: How to convert value in dictionary from string to int
body: <p>I have a list of dictionaries, where both the key and value are strings.
  I am importing the data from a CSV file.
  The dictionaries look like this:</p>
  <pre class="lang-py prettyprint-override"><code>{'1A': '1',
   '1B': '1',
   '1C': '2'}
  </code></pre>
  <p>I would like to change the values into integers.</p>
  <p>I have looked around for a solution but I don't seem to find anything that works.</p>
  <p>This is my code (the list is called 'buyers'):</p>
  <pre><code>for i in buyers:
      for k, v in i.items():
          i[v] = int(i[v])
  </code></pre>
  <p>I receive this error:</p>
  <pre><code>i[v] = int(i[v])
  
  KeyError: '1'
  </code></pre>
  <p>I'm not sure what to do because it says my error is the '1', which seems to me like it should be able to be converted into an int.</p>