我有一个熊猫系列,里面有一些数据:
In [117]: data1.C_TRQENG
Out[117]:
0 Nm
1 4.85
2 5.339
3 2.552
4 -0.171
5 -0.142
6 1.218
7 -1.133
8 2.188
9 0.88
10 4.316
11 10.06
12 8.925
13 8.262
14 7.627
...
Name: C_TRQENG, Length: 1230, dtype: object
另一个序列中有一些最大值
In [115]: data
Out[115]:
915 199.571429
1087 173.339207
984 114.696170
27 90.184324
82 80.805341
Name: C_TRQENG, dtype: float64
In [116]: data.index
Out[116]: Int64Index([915, 1087, 984, 27, 82], dtype='int64')
我想用正负100的窗口来绘制这些索引的原始数据,以便对这些点上发生的事情有一个大致的了解。如何使用plot()执行此操作?你知道吗
使用熊猫切片为每个索引创建一个窗口,然后绘制它
相关问题 更多 >
编程相关推荐