parameters: (self, data)
docstring: Update the widget with new data. If running in client mode, this
          method serializes the data and calls the browser viewer's update
          method. Otherwise, it calls `Viewer.update()` using `super()`.
docstring_summary: Update the widget with new data. If running in client mode, this
          method serializes the data and calls the browser viewer's update
          method. Otherwise, it calls `Viewer.update()` using `super()`.
docstring_tokens: Update the widget with new data . If running in client mode this method serializes the data and calls the browser viewer s update method . Otherwise it calls Viewer . update () using super () .
function: def update(self, data):
          """Update the widget with new data. If running in client mode, this
          method serializes the data and calls the browser viewer's update
          method. Otherwise, it calls `Viewer.update()` 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.post({"cmd": "update", "data": d})
          else:
              super(PerspectiveWidget, self).update(data)
function_tokens: def update ( self , data ) : 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 . post ( { "cmd" : "update" , "data" : d } ) else : super ( PerspectiveWidget , self ) . update ( data )