code: def test_shift(self):
      pdf = pd.DataFrame(
          {
              "Col1": [10, 20, 15, 30, 45],
              "Col2": [13, 23, 18, 33, 48],
              "Col3": [17, 27, 22, 37, 52],
          },
          index=np.random.rand(5),
      )
      psdf = ps.from_pandas(pdf)
  
      self.assert_eq(pdf.shift(3), psdf.shift(3))
      self.assert_eq(pdf.shift().shift(-1), psdf.shift().shift(-1))
      self.assert_eq(pdf.shift().sum().astype(int), psdf.shift().sum())
  
      # Need the expected result since pandas 0.23 does not support `fill_value` argument.
      pdf1 = pd.DataFrame(
          {
              "Col1": [0, 0, 0, 10, 20],
              "Col2": [0, 0, 0, 13, 23],
              "Col3": [0, 0, 0, 17, 27],
          },
          index=pdf.index,
      )
      self.assert_eq(pdf1, psdf.shift(periods=3, fill_value=0))
      msg = "should be an int"
      with self.assertRaisesRegex(TypeError, msg):
          psdf.shift(1.5)
  
      # multi-index columns
      columns = pd.MultiIndex.from_tuples(
          [("x", "Col1"), ("x", "Col2"), ("y", "Col3")]
      )
      pdf.columns = columns
      psdf.columns = columns
      self.assert_eq(pdf.shift(3), psdf.shift(3))
      self.assert_eq(pdf.shift().shift(-1), psdf.shift().shift(-1))
      self.assert_eq(pdf.shift(0), psdf.shift(0))
  
file_path: spark/python/pyspark/pandas/tests/frame/test_time_series.py
imports: from datetime import datetime
  import unittest
  import numpy
  import pandas
  from pyspark import pandas
  from pyspark.testing.pandasutils import ComparisonTestBase
  from pyspark.testing.sqlutils import SQLTestUtils
label_desc: Use image node_id 1 for calling the FrameTimeSeriesMixin obj's underlying member method code with example usage: obj.test_shift() without return types