Reputation: 2600
I'm trying to plot an autocorrelation_plot()
of a time series using pandas.
According to this SO post pandas.tools
was removed in 0.24.0 and the autocorrelation_plot function can now be found in the pandas.plotting
library. However the API shows no reference to this function.
I'm able to plot an autocorrelation by importing the function but where can I find the documentation?
from pandas.plotting import autocorrelation_plot # works fine
slope = -1
offset = 250
noise_scale = 100
npts = 100
x = np.linspace(0, 100, npts)
y = slope*x + noise_scale*np.random.rand(npts) + offset
autocorrelation_plot(y)
Python: 3.7.2
Pandas: 0.24.1
Upvotes: 1
Views: 3828
Reputation: 3497
I think this would probably be more appropriate as an issue in GitHub.
In any case, autocorrelation_plot
and the similar plots (andrews_curves
, radviz
,...) are probably going to be moved out of pandas, into a separate package. So you can expect to have to call something like pandas_matplotlib.autocorrelation_plot()
in the future (see #28177).
In the meantime, I'm adding it and some other missing functions to the documentation in #28179. When the pull request is merged, you'll be able to see the docs in https://dev.pandas.io. But there is nothing very interesting for autocorrelation_plot
:
Upvotes: 2
Reputation: 2740
Have a look at:
https://github.com/pandas-dev/pandas/blob/v0.24.1/pandas/plotting/_misc.py#L600
Looks like it was buried in the plotting._misc
source code.
Upvotes: 0
Reputation: 1821
You can at least find a reference and a short doc here: https://pandas.pydata.org/pandas-docs/stable/user_guide/visualization.html#visualization-autocorrelation
Btw, you can search the docs for any keyword: https://pandas.pydata.org/pandas-docs/stable/search.html?q=autocorrelation_plot&check_keywords=yes&area=default#
Upvotes: 0