class_docstr: Pandas ExtensionArray to represent ragged arrays
  
  Methods not otherwise documented here are inherited from ExtensionArray;
  please see the corresponding method on that class for the docstring
class_docstr_tok: ["Pandas","ExtensionArray","to","represent","ragged","arrays","Methods","not","otherwise","documented","here","are","inherited","from","ExtensionArray",";","please","see","the","corresponding","method","on","that","class","for","the","docstring"]
code: def shift(self, periods=1, fill_value=None):
      # Override in RaggedArray to handle ndarray fill values
  
      # Note: this implementation assumes that `self.dtype.na_value` can be
      # stored in an instance of your ExtensionArray with `self.dtype`.
      if not len(self) or periods == 0:
          return self.copy()
  
      if fill_value is None:
          fill_value = np.nan
  
      empty = self._from_sequence(
          [fill_value] * min(abs(periods), len(self)), dtype=self.dtype
      )
      if periods > 0:
          a = empty
          b = self[:-periods]
      else:
          a = self[abs(periods) :]
          b = empty
      return self._concat_same_type([a, b])
  
imports: from __future__ import annotations
  import re
  from functools import total_ordering
  from packaging.version import Version
  import numpy
  import pandas
  from numba import jit
  from pandas.api.extensions import ExtensionDtype, ExtensionArray, register_extension_dtype
  from numbers import Integral
  from pandas.api.types import pandas_dtype, is_extension_array_dtype
label_desc: Use image node_id 15 for calling the RaggedArray obj's underlying member method code with example usage: obj.shift(periods, fill_value) and returns: self, self