Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Finding the min and max
- c_max_index = argrelextrema(df.flow.values, np.greater, order=3)
- c_min_index = argrelextrema(df.flow.values, np.less, order=3)
- df['min_extreme'] = df.flow[c_min_index[0]]
- df['max_extreme'] = df.flow[c_max_index[0]]
- # Plotting the values for the graph above
- plt.plot(df.flow.values)
- upper_bound = plt.plot(c_max_index[0], df.flow.values[c_max_index[0]], linewidth=0.8, c='g')
- lower_bound = plt.plot(c_min_index[0], df.flow.values[c_min_index[0]], linewidth=0.8, c='r')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement