July 2019
Beginner to intermediate
740 pages
16h 52m
English
The lag plots in the preceding section are also a way to visualize autocorrelation. Autocorrelation means that the time series is correlated with a lagged version of itself. Pandas provides an additional way to look for this with autocorrelation_plot(), which shows the autocorrelation by the number of lags. Random data will be near an autocorrelation of 0 and within the confidence bands (99% is dashed; 95% is solid).
Let's examine what this looks like for random data generated with NumPy:
>>> from pandas.plotting import autocorrelation_plot>>> np.random.seed(0) # make this repeatable>>> autocorrelation_plot(pd.Series(np.random.random(size=200)))
Indeed, the autocorrelation is near zero, and the line is within the confidence ...
Read now
Unlock full access