-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsVisualizationplottingplotting
Milestone
Description
This works fine:
In [13]: df = pd.DataFrame(np.random.randn(300), columns=['a'])
In [14]: df['dtime'] = pd.DatetimeIndex(start='2014-01-01', freq='h', periods=300).time
In [15]: df.plot(x='dtime', y='a')
Out[15]: <matplotlib.axes._subplots.AxesSubplot at 0x118fd17f0>
This raises a KeyError
In [17]: df.plot(x='dtime', y='a', kind='scatter')
We call df._get_numeric_data()
which excludes datetimes.
May happen for other kinds too.
I'll fix this; just have to decide how much refactoring.
Matplotlib is ok with datetime.time
values, it chokes on datetime
values.
michaelaye and Edward-Knight
Metadata
Metadata
Assignees
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsVisualizationplottingplotting