docarray.base module#
- class docarray.base.BaseDCType(_obj=None, copy=False, field_resolver=None, unknown_fields_handler='catch', **kwargs)[source]#
Bases:
object
- copy_from(other)[source]#
Overwrite self by copying from another
Document
.- Parameters:
other (T) – the other Document to copy from
- Return type:
None
- pop(*fields)[source]#
Clear some fields from this
Document
to their default values.- Parameters:
fields – field names to clear.
- Return type:
None
- property non_empty_fields: Tuple[str]#
Get all non-emtpy fields of this
Document
.Non-empty fields are the fields with not-None and not-default values.
- Return type:
Tuple
[str
]- Returns:
field names in a tuple.
- property nbytes: int#
Return total bytes consumed by protobuf.
- Return type:
int
- Returns:
number of bytes