IPython / pandas:是否有一种规范的方法来检测时间序列中的快速变化?

IPython / pandas: Is there an canonical way to detect rapid changes in a timeseries?

新手数据分析师,在几千个点(如此之小)的时间序列上分析一些气体浓度。我用 Matplotlib 绘制了它的图形,其中有一些很容易看出事情变化很快的点。

了解这些要点的规范/最简单的方法是什么?

import pandas as pd
from numpy import diff, concatenate
ff = pd.DataFrame( #acquire data here
      columns=('Year','Recon'))
fd = diff(ff['Recon'], axis=-1)
ff['diff'] = concatenate([[0],fd],axis=0)
ff['rolling10'] = pd.rolling_mean(ff['diff'],10)
ff['rolling5'] = pd.rolling_mean(ff['diff'],5)
ff.plot('Year',['rolling5','rolling10'],subplots=False)

但请注意!我的测试数据被均匀采样。看起来 rolling_* 还不适用于不规则时间序列,尽管有一些解决方法:Pandas: rolling mean by time interval