Select row from a DataFrame based on the type of the object(i.e. str) : <p>So there's a DataFrame say:</p>

<pre><code>&gt;&gt;&gt; df = pd.DataFrame({
...                 'A':[1,2,'Three',4],
...                 'B':[1,'Two',3,4]})
&gt;&gt;&gt; df
       A    B
0      1    1
1      2  Two
2  Three    3
3      4    4
</code></pre>

<p>I want to select the rows whose datatype of particular row of a particular column is of type <code>str</code>.</p>

<p>For example I want to select the row where <code>type</code> of data in the column <code>A</code> is a <code>str</code>.
 so it should print something like:</p>

<pre><code>   A      B
2  Three  3
</code></pre>

<p>Whose intuitive code would be like:</p>

<pre><code>df[type(df.A) == str]
</code></pre>

<p>Which obviously doesn't works!</p>

<p>Thanks please help!</p>
