title: Using dict.get() in mapping values in pandas dataframe
body: <p>I am following a code in a book, and in the dataframe, I have a column of 30~40 occupations some of which are not provided, and I want to map unprovided occupations to "Not Provided"
  So I created a dictionary as below</p>
  
  <pre><code>occ_mapping = {'INFORMATION REQUESTED PER BEST EFFORTS' : 'NOT PROVIDED', 'INFORMATION REQUESTED' : 'NOT PROVIDED','INFORMATION REQUESTED (BEST EFFORTS)' : 'NOT PROVIDED','C.E.O.': 'CEO'}
  </code></pre>
  
  <p>Is there difference between the following two codes?</p>
  
  <pre><code>f = lambda x: occ_mapping.get(x, x)    
  fec.contbr_occupation = fec.contbr_occupation.map(f)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>fec.contbr_occupation = fec.contbr_occupation.map(occ_mapping)
  </code></pre>
  
  <p>The book says it uses .get() to allow occupations with no mapping to "pass through", not sure what this means especially if the above codes do the same.</p>
  
  <p>And the variable x refers to the occupation in the dataframe, not dict. Am I correct? </p>