Getting "TypeError: float() argument must be a string or a number" with pandas plot() : <p>I am going thru simple pandas tutorial. And I am trying to plot DataFrame indexed by dtype='datetime64[ns]', however, when I try to plot, I assume the matplotlib attempts to convert the date to float, which raises an exception.</p>

<pre><code>&gt;&gt;&gt; df.index
DatetimeIndex(['2012-01-01', '2012-01-02', '2012-01-03', '2012-01-04',
           '2012-01-05', '2012-01-06', '2012-01-07', '2012-01-08',
           '2012-01-09', '2012-01-10',
           ...
           '2012-12-22', '2012-12-23', '2012-12-24', '2012-12-25',
           '2012-12-26', '2012-12-27', '2012-12-28', '2012-12-29',
           '2012-12-30', '2012-12-31'],
          dtype='datetime64[ns]', name=u'Date', length=366, freq=None)

&gt;&gt;&gt; df.plot()
Traceback (most recent call last):
  ...
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/lines.py", line 676, in recache
    x = np.asarray(xconv, np.float_)
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py", line 531, in asarray
    return array(a, dtype, copy=False, order=order)
TypeError: float() argument must be a string or a number
</code></pre>

<p>What am I doing wrong?</p>

<p>note: I am following very simple tutorial here: <a href="http://nbviewer.jupyter.org/github/jvns/pandas-cookbook/blob/v0.1/cookbook/Chapter%201%20-%20Reading%20from%20a%20CSV.ipynb" rel="nofollow noreferrer">http://nbviewer.jupyter.org/github/jvns/pandas-cookbook/blob/v0.1/cookbook/Chapter%201%20-%20Reading%20from%20a%20CSV.ipynb</a></p>
