title: 'str' object has no attribute 'map'
body: <p>I want to replace gas with <code>1</code> and diesel with <code>0</code> but not able to do that and getting below error:</p>
  
  <blockquote>
    <p>AttributeError: <code>str</code> object has no attribute <code>map</code></p>
  </blockquote>
  
  <p>code:</p>
  
  <pre><code>carprice['fueltype']=carprice['fueltype'].apply(lambda x: x.map({'gas':1,'diesel':0}))
  </code></pre>