docstr: Make the data attribute a list no matter the input type, unless
  use_binary_transport is specified, which case we circumvent
  serializing the data to JSON
docstr_tok: ["Make","the","data","attribute","a","list","no","matter","the","input","type",",","unless","use_binary_transport","is","specified",",","which","case","we","circumvent","serializing","the","data","to","JSON"]
code: def data(self, data_set):
      """Make the data attribute a list no matter the input type, unless
      use_binary_transport is specified, which case we circumvent
      serializing the data to JSON
      """
      if self.use_binary_transport:
          self._binary_data = self._prepare_binary_data(data_set)
      elif is_pandas_df(data_set):
          self._data = data_set.to_dict(orient="records")
      elif has_geo_interface(data_set):
          self._data = records_from_geo_interface(data_set)
      else:
          self._data = data_set
  
file_path: deck.gl/bindings/pydeck/pydeck/bindings/layer.py
imports: import uuid
  import numpy
  from ..data_utils import is_pandas_df, has_geo_interface, records_from_geo_interface
  from .json_tools import JSONMixin, camel_and_lower
  from ..settings import settings
  from pydeck.types import Image, Function
  from pydeck.exceptions import BinaryTransportException
label_desc: Use image node_id 3 for calling the Layer obj's underlying member method code with example usage: obj.data(data_set) without return types