I want to count how many large decreasing point before the last point.
(我想计算最后一点之前有多少个大的下降点。)
Let say I have this dataframe
(假设我有这个数据框)
df = pd.DataFrame([[('2000-09-29 22:00:00'), 78.48659257615778],
[('2000-09-29 23:00:00'), 79.46896724006444],
[('2000-09-30 00:00:00'), 79.74108445117001],
[('2000-09-30 01:00:00'), 79.59727418822389],
[('2000-09-30 02:00:00'), 79.73048396364723],
[('2000-09-30 03:00:00'), 79.09930124357557],
[('2000-09-30 04:00:00'), 78.28903340851555],
[('2000-09-30 05:00:00'), 78.12229420958224],
[('2000-09-30 06:00:00'), 78.89923606080113],
[('2000-09-30 07:00:00'), 78.9620439478767],
[('2000-09-30 08:00:00'), 78.92566676678388],
[('2000-09-30 09:00:00'), 61.74819886499889],
[('2000-09-30 10:00:00'), 35.235524848405]])
df.columns = ['DATE', 'V1']
plt.plot(pd.to_datetime(df['DATE']), df['V1'], marker='.', markersize=8)
plt.show()
I want to get the count how many point have large deviate before the last point.
(我想计算最后一点之前有多少个点有较大的偏差。)
In this case it will give one point that decreasing largely before the last point. (在这种情况下,将给出一个点,该点在最后一点之前大大减少。)
ask by lemon93 translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…