def __init__(self, ds): super(DataVaex, self).__init__() self.ds = ds self.id = ComponentIDDict(self) self._main_components = [ ComponentID(label=str(k), parent=self) for k in self.ds.get_column_names(strings=False, virtual=True) ]
def __init__(self, label="", coords=None, **kwargs): """ :param label: label for data :type label: str Extra array-like keywords are extracted into components """ self._shape = () # Components self._components = OrderedDict() self._externally_derivable_components = OrderedDict() self._pixel_aligned_data = OrderedDict() self._pixel_component_ids = ComponentIDList() self._world_component_ids = ComponentIDList() # Coordinate conversion object self.coords = coords or Coordinates() self.id = ComponentIDDict(self) # Metadata self.meta = OrderedDict() # Subsets of the data self._subsets = [] # Hub that the data is attached to self.hub = None self.style = VisualAttributes(parent=self) self._coordinate_links = [] self.data = self self.label = label self.edit_subset = None for lbl, data in sorted(kwargs.items()): self.add_component(data, lbl) self._key_joins = {} # To avoid circular references when saving objects with references to # the data, we make sure that all Data objects have a UUID that can # uniquely identify them. self.uuid = str(uuid.uuid4())
def __init__(self, label="", **kwargs): """ :param label: label for data :type label: str Extra array-like keywords are extracted into components """ # Coordinate conversion object self.coords = Coordinates() self._shape = () # Components self._components = OrderedDict() self._pixel_component_ids = [] self._world_component_ids = [] self.id = ComponentIDDict(self) # Subsets of the data self._subsets = [] # Hub that the data is attached to self.hub = None self.style = VisualAttributes(parent=self) self._coordinate_links = None self.data = self self.label = label self.edit_subset = None for lbl, data in sorted(kwargs.items()): self.add_component(data, lbl) self._key_joins = {}