trends in yearly data python

Solutions on MaxInterview for trends in yearly data python by the best coders in the world

showing results for - "trends in yearly data python"
Bruno
16 Sep 2016
1import matplotlib.pyplot as pltimport matplotlib.dates as mdatesfig, ax = plt.subplots()ax.grid(True)year = mdates.YearLocator(month=1)month = mdates.MonthLocator(interval=3)year_format = mdates.DateFormatter('%Y')month_format = mdates.DateFormatter('%m')ax.xaxis.set_minor_locator(month)ax.xaxis.grid(True, which = 'minor')ax.xaxis.set_major_locator(year)ax.xaxis.set_major_formatter(year_format)plt.plot(data_set.index, data_set['#Passengers'], c='blue')plt.plot(decomposition.trend.index, decomposition.trend, c='red')
Brooke
23 Mar 2018
1>>> selected = fcdata.loc[('16/12/2004 20:16:00' < fcdata.index) & (fcdata.index < '16/12/2004 20:25:00'),'Feed rate']
2>>> selected.plot()
3>>> plt.show()
4