towhee.functional.entity.Entity

class towhee.functional.entity.Entity[source]

Bases: object

Entity is the basic data type in DataCollection.

Users can create an Entity with free schema, which means there is no limit on attribute name and type.

Methods

__init__()[source]

Create an Entity with given attributes.

__repr__()[source]

Define the representation of the Entity.

Examples:

>>> from towhee import Entity
>>> e = Entity(a = 1, b = 2)
>>> e
<Entity dict_keys(['a', 'b'])>