title: Checking if a data series is strings
body: <p>I want to check if a column in a dataframe contains strings. I would have thought this could be done just by checking dtype, but that isn't the case. A pandas series that contains strings just has dtype 'object', which is also used for other data structures (like lists):</p>
  
  <pre><code>df = pd.DataFrame({'a': [1,2,3], 'b': ['Hello', '1', '2'], 'c': [[1],[2],[3]]})
  
  df = pd.DataFrame({'a': [1,2,3], 'b': ['Hello', '1', '2'], 'c': [[1],[2],[3]]})
  print(df['a'].dtype)
  print(df['b'].dtype)
  print(df['c'].dtype)
  </code></pre>
  
  <p>Produces:</p>
  
  <pre><code>int64
  object
  object
  </code></pre>
  
  <p>Is there some way of checking if a column contains only strings?</p>