class_docstr: :class`~perspective.PerspectiveWidget` allows for Perspective to be used
  in the form of a Jupyter IPython widget.
  
  Using `perspective.Table`, you can create a widget that extends the full
  functionality of `perspective-viewer`.  Changes on the viewer can be
  programatically set on the :class`~perspective.PerspectiveWidget` instance,
  and state is maintained across page refreshes.
  
  Examples:
      >>> from perspective import Table, PerspectiveWidget
      >>> data = {
      ...     "a": [1, 2, 3],
      ...     "b": [
      ...         "2019/07/11 7:30PM",
      ...         "2019/07/11 8:30PM",
      ...         "2019/07/11 9:30PM"
      ...     ]
      ... }
      >>> tbl = Table(data, index="a")
      >>> widget = PerspectiveWidget(
      ...     tbl,
      ...     group_by=["a"],
      ...     sort=[["b", "desc"]],
      ...     filter=[["a", ">", 1]]
      ... )
      >>> widget.sort
      [["b", "desc"]]
      >>> widget.sort.append(["a", "asc"])
      >>> widget.sort
      [["b", "desc"], ["a", "asc"]]
      >>> widget.update({"a": [4, 5]}) # Browser UI updates
docstr: Load the widget with data. If running in client mode, this method
  serializes the data and calls the browser viewer's load method.
  Otherwise, it calls `Viewer.load()` using `super()`.
docstr_tok: ["Load","the","widget","with","data",".","If","running","in","client","mode",",","this","method","serializes","the","data","and","calls","the","browser","viewer","'s","load","method",".","Otherwise",",","it","calls","`","Viewer.load","(",")","`","using","`","super","(",")","`","."]
code: def load(self, data, **options):
      """Load the widget with data. If running in client mode, this method
      serializes the data and calls the browser viewer's load method.
      Otherwise, it calls `Viewer.load()` using `super()`.
      """
      if self.client is True:
          # serialize the data and send a custom message to the browser
          if isinstance(data, pandas.DataFrame) or isinstance(
              data, pandas.Series
          ):
              data, _ = deconstruct_pandas(data)
          d = _serialize(data)
          self._data = d
      else:
          # Viewer will ignore **options if `data` is a Table or View.
          super(PerspectiveWidget, self).load(data, **options)
  
      # Notify front-end of load immediately.
      message = self._make_load_message()
      self.send(message.to_dict())
  
imports: import base64
  import jinja2
  import json
  import os
  from datetime import date, datetime
  from functools import partial
  import numpy
  import pandas
  from ipywidgets import DOMWidget
  from traitlets import Unicode, observe
  from ..core._version import __version__
  from ..core.data import deconstruct_pandas
  from ..core.exception import PerspectiveError
  from ..libpsp import is_libpsp
  from ..viewer import PerspectiveViewer
label_desc: Use image node_id 2 for calling the PerspectiveWidget obj's underlying member method code with example usage: obj.load(data) without return types