title: Asserting column(s) data type in Pandas
body: <p>I'm trying to find a better way to assert the column data type in Python/Pandas of a given dataframe.</p>
  
  <p>For example:</p>
  
  <pre><code>import pandas as pd
  t = pd.DataFrame({'a':[1,2,3], 'b':[2,6,0.75], 'c':['foo','bar','beer']})
  </code></pre>
  
  <p>I would like to assert that specific columns in the data frame are numeric.  Here's what I have:</p>
  
  <pre><code>numeric_cols = ['a', 'b']  # These will be given
  assert [x in ['int64','float'] for x in [t[y].dtype for y in numeric_cols]]
  </code></pre>
  
  <p>This last assert line doesn't feel very pythonic.  Maybe it is and I'm just cramming it all in one hard to read line.  Is there a better way?  I would like to write something like:</p>
  
  <pre><code>assert t[numeric_cols].dtype.isnumeric()
  </code></pre>
  
  <p>I can't seem to find something like that though.</p>