擅长:python、mysql、java
<p>如果需要count number of columns with numeric使用<a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.str.isnumeric.html" rel="nofollow noreferrer">^{<cd1>}</a>和<code>sum</code>作为count<code>True</code>的值:</p>
<pre><code>out = df.columns.astype(str).str.isnumeric().sum()
print (out)
8
</code></pre>