python pandas and locate values
<p>Let's say I've a DataSerie like this :</p>

<pre><code>df = pandas.DataFrame(numpy.random.randn(4,4),columns=list('ABCD'))
df['test'] = ['A','B','A','C']
</code></pre>

<p>I would like to extract the lines with the 'A' letter and retrieve the values of a Serie, let's say 'C' column. How is it possible to do this whitouh looping into the serie ?
Many thanks.</p>

<p>How about</p>

<pre><code>df[df['test'].str.contains('A')]['C']
</code></pre>

python pandas locate