title: pandas get string label from factorized dataframe
body: <p>I factorized my pandas dataframe column but overwrote the original column value. </p>
  
  <p>Is there any way to get the original mapping values back for reference?</p>
  
  <p>Example:</p>
  
  <pre><code>df_test = pd.DataFrame({'col1': pd.Series(['cat','dog','cat','mouse'])})
  df_test['col1'] = pd.factorize(df_test['col1'])[0]
  df_test
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/o7xrV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o7xrV.png" alt="enter image description here"></a></p>
  
  <p>however i want to be able to call the below again to check what the integers map to. Is there any way to check the mapping without re-initializing the dataframe?</p>
  
  <pre><code>pd.factorize(df_test)[1]
  </code></pre>