code: def test_autoregressive_ad_dataframe():
      """Make sure deepcopy works"""
      df = pd.DataFrame(
          np.array(
              [
                  [
                      13,
                      -8,
                      5,
                      -3,
                      2,
                      -1,
                      1,
                      0,
                      1,
                      1,
                      2,
                      3,
                      6,
                      9,
                      15,
                      24,
                  ],
                  [
                      24,
                      15,
                      9,
                      6,
                      3,
                      2,
                      1,
                      1,
                      0,
                      1,
                      -1,
                      2,
                      -3,
                      5,
                      -8,
                      13,
                  ],
              ]
          ).T,
          columns=["A", "B"],
          index=pd.date_range(start="2017-1-1", periods=16, freq="D"),
      )
      a_true = pd.DataFrame(
          np.array(
              [
                  [nan, nan, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
                  [nan, nan, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
              ]
          ).T,
          columns=["A", "B"],
          index=pd.date_range(start="2017-1-1", periods=16, freq="D"),
      )
      model = detector.AutoregressionAD(
          n_steps=2, side="both", regressor=SVR(kernel="linear")
      )
      for i in range(2):
          a = model.fit_detect(df.iloc[:, i])
          pd.testing.assert_series_equal(
              a, a_true.iloc[:, i], check_dtype=False
          )
  
      a = model.fit_detect(df)
      pd.testing.assert_frame_equal(a, a_true, check_dtype=False)
  
file_path: adtk/tests/test_detector1d.py
imports: from math import isnan
  import numpy
  import pandas
  import pytest
  from packaging.version import parse
  from sklearn.svm import SVR
  import adtk.detector
  from adtk._base import _TrainableModel
  from adtk._utils import PandasBugError
label_desc: Use image node_id 5 for calling a global function with example usage: test_autoregressive_ad_dataframe() without return types