pandas.plotting.autocorrelation_plot

pandas 3.1.1 · Plotting · function

Plot the correlation of a series with itself across multiple lags.

Call syntax

pd.plotting.autocorrelation_plot(series, ax=None, **kwargs)

Inspect the call

Run this code to inspect the callable and its parameters. Its data, backend, or environment is needed to execute the operation itself.

Parameters

ParameterRequirementAccepted values and behavior
series Required
Positional or keyword
Series

Provide the one-dimensional input data.

ax Optional
Positional or keyword
Default None
Matplotlib axis object

Provide the existing Matplotlib axes on which to draw.

**kwargs Optional
Additional keyword arguments

Returns

matplotlib.axes.Axes

Example for a local Python session

import pandas as pd
import matplotlib
values = pd.Series([2., 5., 7.], name="units")
print(pd.plotting.autocorrelation_plot(values))