Share via


DocumentTable Class

A table object consisting table cells arranged in a rectangular layout.

Constructor

DocumentTable(*args: Any, **kwargs: Any)

Variables

Name Description
row_count
int

Number of rows in the table. Required.

column_count
int

Number of columns in the table. Required.

cells

Cells contained within the table. Required.

bounding_regions

Bounding regions covering the table.

spans

Location of the table in the reading order concatenated content. Required.

caption

Caption associated with the table.

footnotes

List of footnotes associated with the table.

Methods

as_dict

Return a dict that can be JSONify using json.dump.

clear
copy
get
items
keys
pop
popitem
setdefault
update
values

as_dict

Return a dict that can be JSONify using json.dump.

as_dict(*, exclude_readonly: bool = False) -> Dict[str, Any]

Keyword-Only Parameters

Name Description
exclude_readonly

Whether to remove the readonly properties.

Default value: False

Returns

Type Description

A dict JSON compatible object

clear

clear() -> None

copy

copy() -> Model

get

get(key: str, default: Any = None) -> Any

Parameters

Name Description
key
Required
default
Default value: None

items

items() -> ItemsView[str, Any]

keys

keys() -> KeysView[str]

pop

pop(key: str, default: ~typing.Any = <object object>) -> Any

Parameters

Name Description
key
Required
default

popitem

popitem() -> Tuple[str, Any]

setdefault

setdefault(key: str, default: ~typing.Any = <object object>) -> Any

Parameters

Name Description
key
Required
default

update

update(*args: Any, **kwargs: Any) -> None

values

values() -> ValuesView[Any]

Attributes

bounding_regions

Bounding regions covering the table.

bounding_regions: List[_models.BoundingRegion] | None

caption

Caption associated with the table.

caption: _models.DocumentCaption | None

cells

Cells contained within the table. Required.

cells: List[_models.DocumentTableCell]

column_count

Number of columns in the table. Required.

column_count: int

footnotes

List of footnotes associated with the table.

footnotes: List[_models.DocumentFootnote] | None

row_count

Number of rows in the table. Required.

row_count: int

spans

Location of the table in the reading order concatenated content. Required.

spans: List[_models.DocumentSpan]