title: Pandas error: Can only use .str accessor with string values, which use np.object_ dtype in pandas
body: <p>I have data in my <strong>.txt</strong> file as below:</p>
  
  <pre><code>029070 ***** 190101010600 270 36 OVC ** 0.0 ** **
  </code></pre>
  
  <p>I want to extract 190101 from the column 3, I am getting <strong>AttributeError: Can only use .str accessor with string values, which use np.object_ dtype in pandasbelow is my python pandas</strong>. Below is my code</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  import re
  
  data = pd.read_csv('dummy.txt', sep=" ", low_memory=False, header=None)
  data.columns = ["a", "b", "c","d","e","f","g","h","i","j"]
  
  print(data.c.str[0:6])
  </code></pre>