title: Python Error: TypeError: argument of type 'type' is not iterable
body: <p>I'm learning to know how Python Dictionaries work and is writing a small program to know if the word <code>awesome</code> in the word count column, then it should return me the value. </p>
  
  <p>However, it is giving me the following error:</p>
  
  <pre><code>TypeError: argument of type 'type' is not iterable
  </code></pre>
  
  <p>My <code>word_count</code> column is like below:</p>
  
  <pre><code>{'and': 5, 'stink': 1, 'because': 2}
  {'awesome': 3, 'bad': 2}
  {'mac': 5, 'awesome': 1}
  </code></pre>
  
  <p>I have created this function:</p>
  
  <pre><code>def awesome_count(self):
      if 'awesome' in dict:
          return dict['awesome']
      else:
          return 0
  </code></pre>
  
  <p>after then, I'm using apply function to get the count, but getting an error:</p>
  
  <pre><code>products['awesome'] = products['word_count'].apply(awesome_count)
  </code></pre>
  
  <p>Expecting the following answer:</p>
  
  <pre><code>0,3,1 i.e number of times awesome is present 
  </code></pre>