我有低于这个CSV数据:不能打电话的时间数据在python
2015-01-02,02:29:45 PM,Red
2015-01-02,05:16:15 PM,Red
2015-01-02,05:48:46 PM,Blue
2015-01-02,03:18:34 PM,Blue
2015-01-02,05:22:55 PM,Red
2015-01-02,03:25:45 PM,Blue
2015-01-02,04:23:16 PM,Red
我试图使用matplotlib 这些数据绘制成曲线图,其中x轴=日期,y轴=时间值=红色或蓝色的点 但是,我越来越想呼叫的时间栏时,这个错误:
time = df('Time')
print (time.head())
**DataFrame' object is not callable**
但如果我所说的日期栏,它工作正常:
date = df['Date']
print (date.head())
0 2015-01-02
1 2015-01-02
2 2015-01-02
3 2015-01-02
4 2015-01-02
Name: Date, dtype: datetime64[ns]
也许把你的代码放在阴谋...... – bernie