title: Python AttributeError: Can only use .str accessor with string values
body: <pre><code>flights['Duration']=flights['Duration'].str.replace('h','*60').str.replace(' ','+').str.replace('m','*1').apply(eval)
  </code></pre>
  
  <p>However I am getting this error message:</p>
  
  <pre><code>AttributeError                            Traceback (most recent call last)
      &lt;ipython-input-24-45eafc3e9d23&gt; in &lt;module&gt;()
      ----&gt; 1 travel['Duration']=travel['Duration'].str.replace('h','*60').str.replace(' ','+').str.replace('m','*1').apply(eval)
            2 
      3 frames
      /usr/local/lib/python3.6/dist-packages/pandas/core/strings.py in _validate(data)
         1965 
         1966         if inferred_dtype not in allowed_types:
      -&gt; 1967             raise AttributeError("Can only use .str accessor with string " "values!")
         1968         return inferred_dtype
         1969 
  
      AttributeError: Can only use .str accessor with string values!
  </code></pre>