Search code examples
pythontime-seriesstatsmodels

Get raw data for timeseries autocorrelation function (plot_acf)


It's easy to plot acf however I didn't find anywhere a way to extract raw values.

How can I access correlation coefficient and statistical significate by lag index?

Kind of:
x[1] -> (1,NaN)
or
x[12] -> (0.9,0.21)

enter image description here


Solution

  • As Flavia posted in the comment section the answer is to use: statsmodels.tsa.stattools.acf.

    Answering to be able to mark it as a proper answer in case somebody else will need it.