class_docstr: Preallocation strategies for rolling window over expanding data set
  
  Restrictions: major_axis can only be a DatetimeIndex for now
class_docstr_tok: ["Preallocation","strategies","for","rolling","window","over","expanding","data","set","Restrictions",":","major_axis","can","only","be","a","DatetimeIndex","for","now"]
docstr: Get a Panel that is the current data in view. It is not safe to persist
  these objects because internal data might change
docstr_tok: ["Get","a","Panel","that","is","the","current","data","in","view",".","It","is","not","safe","to","persist","these","objects","because","internal","data","might","change"]
code: def get_current(self, item=None, raw=False, start=None, end=None):
      """
      Get a Panel that is the current data in view. It is not safe to persist
      these objects because internal data might change
      """
      item_indexer = slice(None)
      if item:
          item_indexer = self.items.get_loc(item)
  
      start_index = self._start_index
      end_index = self._pos
  
      # get inital date window
      where = slice(start_index, end_index)
      current_dates = self.date_buf[where]
  
      def convert_datelike_to_long(dt):
          if isinstance(dt, pd.Timestamp):
              return dt.asm8
          if isinstance(dt, datetime.datetime):
              return np.datetime64(dt)
          return dt
  
      # constrict further by date
      if start:
          start = convert_datelike_to_long(start)
          start_index += current_dates.searchsorted(start)
  
      if end:
          end = convert_datelike_to_long(end)
          _end = current_dates.searchsorted(end, "right")
          end_index -= len(current_dates) - _end
  
      where = slice(start_index, end_index)
  
      values = self.buffer.values[item_indexer, where, :]
      current_dates = self.date_buf[where]
  
      if raw:
          # return copy so we can change it without side effects here
          return values.copy()
  
      major_axis = pd.DatetimeIndex(deepcopy(current_dates), tz="utc")
      if values.ndim == 3:
          return pd.Panel(
              values,
              self.items,
              major_axis,
              self.minor_axis,
              dtype=self.dtype,
          )
  
      elif values.ndim == 2:
          return pd.DataFrame(
              values, major_axis, self.minor_axis, dtype=self.dtype
          )
  
imports: import datetime
  from copy import deepcopy
  import numpy
  import pandas
label_desc: Use image node_id 11 for calling the RollingPanel obj's underlying member method code with example usage: obj.get_current(item, raw, start, end) and returns: dt, values, pd, dt, np, pd