Pandas - how to filter rows base on regular expresion
<p>Can you please let me know how to filter rows using Pandas base on character range like [0-9] or [A-Z].</p>

<p>case like this where all the column types are objects</p>

<pre><code>A         B
2.3     234
4.5     4b6
7b       275
</code></pre>

<p>I would like to check if all the values in the column A are floats meaning contains [0-9] and '.' ?
I'm aware of pd.to_numeric, applymap, isreal, isdigit etc but this is object column before I convert it to any numeric I would like to know the scale of the problem for non float vlues.</p>

<p>and which rows in dataset contains chars other than [0-9]</p>

<p>Thanks in advance
E</p>

<p>try this:</p>

<pre><code>In [8]: df
Out[8]:
     A    B
0  2.3  234
1  4.5  4b6
2   7b  275
3   11   11

In [9]: df.A.str.match(r'^\d*\.*\d*$')
Out[9]:
0     True
1     True
2    False
3     True
Name: A, dtype: bool

In [10]: df.ix[df.A.str.match(r'^\d*\.*\d*$')]
Out[10]:
     A    B
0  2.3  234
1  4.5  4b6
3   11   11
</code></pre>

python pandas dataframe