Pandas DataFrame (TypeError: Empty 'DataFrame': no numeric data to plot)
<p>I'm trying to learn how to use pandas and im trying to display a plot showing the total births by sex &amp; year.</p>

<p>[1] [<a href="http://i.stack.imgur.com/R7Vz7.png]" rel="nofollow">http://i.stack.imgur.com/R7Vz7.png]</a> (Cant figure out why there's another column called sex</p>

<p>but this image above the data im trying to plot</p>

<p>and keep getting TypeError: Empty 'DataFrame': no numeric data to plot)</p>

<p>This is what my code looks like</p>

<p>[2] <a href="http://i.stack.imgur.com/FbZmM.png" rel="nofollow">http://i.stack.imgur.com/FbZmM.png</a></p>

<p>This is happening because during the pivot the dataFrame becomes multi-indexed. There are no columns with values to plot against eachother. You can use <code>df.reset_index()</code> to set the multiple indexes as columns, and then plot their values.</p>

python csv plot dataframe