用户7531578386 1365天前
37、波峰和波谷添加注释的时间序列图(Time Series with Peaks and Troughs Annotated) # Import Data df = pd.read_csv('./datasets/AirPassengers.csv') # Get the Peaks and Troughs data = df['value'].values doublediff = np.diff(np.sign(np.diff(data))) peak_locations = np.where(doubled ...全文