我不会经常使用大熊猫,所以总是忘记这些问题。
通常我会用pandas来绘制一些像这样的大数据
In[##]: type(data)
Out[##]: pandas.core.frame.DataFrame
In[##]: data
Out[##]:
0 1
0 2015-06-25 00:05:00 9.073205
1 2015-06-25 00:10:00 9.541540
2 2015-06-25 00:15:00 9.835029
3 2015-06-25 00:20:00 10.025486
4 2015-06-25 00:25:00 10.172231
5 2015-06-25 00:30:00 10.290875
6 2015-06-25 00:35:00 10.390787
7 2015-06-25 00:40:00 10.475087
8 2015-06-25 00:45:00 9.881863
9 2015-06-25 00:50:00 10.275264
10 2015-06-25 00:55:00 10.250286
11 2015-06-25 01:00:00 10.037975
12 2015-06-25 01:05:00 10.384542
13 2015-06-25 01:10:00 9.850641
14 2015-06-25 01:15:00 10.297120
15 2015-06-25 01:20:00 9.869374
16 2015-06-25 01:25:00 10.200331
17 2015-06-25 01:30:00 10.103541
18 2015-06-25 01:35:00 10.087930
19 2015-06-25 01:40:00 10.253409
20 2015-06-25 01:45:00 10.009874
21 2015-06-25 01:50:00 10.390787
22 2015-06-25 01:55:00 9.884985
23 2015-06-25 02:00:00 10.334587
24 2015-06-25 02:05:00 9.788196
25 2015-06-25 02:10:00 10.262775
26 2015-06-25 02:15:00 9.863130
27 2015-06-25 02:20:00 10.190964
28 2015-06-25 02:25:00 10.066075
29 2015-06-25 02:30:00 10.094175
... ... ...
22308 2015-10-09 11:11:00 9.900596
22309 2015-10-09 11:16:00 10.078564
22310 2015-10-09 11:21:00 10.215942
22311 2015-10-09 11:26:00 10.325220
22312 2015-10-09 11:31:00 10.422009
22313 2015-10-09 11:36:00 76.063806
22314 2015-10-09 11:41:00 76.063806
22315 2015-10-09 11:46:00 76.063806
22316 2015-10-09 11:51:00 76.063806
22317 2015-10-09 11:56:00 76.063806
22318 2015-10-09 12:01:00 76.063806
22319 2015-10-09 12:06:00 76.063806
22320 2015-10-09 12:11:00 76.063806
22321 2015-10-09 12:16:00 76.063806
22322 2015-10-09 12:21:00 76.063806
22323 2015-10-09 12:26:00 76.063806
22324 2015-10-09 12:31:00 76.063806
22325 2015-10-09 12:36:00 76.063806
22326 2015-10-09 12:41:00 76.063806
22327 2015-10-09 12:46:00 10.056708
22328 2015-10-09 12:51:00 9.906841
22329 2015-10-09 12:56:00 10.184719
22330 2015-10-09 13:01:00 10.156619
22331 2015-10-09 13:06:00 10.062952
22332 2015-10-09 13:11:00 10.322098
22333 2015-10-09 13:16:00 9.953674
22334 2015-10-09 13:21:00 10.272142
22335 2015-10-09 13:26:00 9.963041
22336 2015-10-09 13:31:00 10.153497
22337 2015-10-09 13:36:00 10.212820
[22338 rows x 2 columns]
In [##]: type(data[0][0])
Out[##]: pandas.tslib.Timestamp
In[##]: data[0][0]
Out[##]: Timestamp('2015-06-25 00:05:00')
哪个没有日期 - 我希望看日期和数据点是否有任何差距..
现在使用plt.plot(data[0], data[1])
给我
显然错误,因为我没有2015年12月的数据,而且它们似乎聚集在一起..
我在这里做错了什么?