tabsdata.tableframe.lazyframe.frame.TableFrame.item#

TableFrame.item() Any[source]#

Returns a scalar value if the TableFrame contains exactly one user column and one row.

Raises an exception if there is more than one user column or more than one row.

Returns None if the TableFrame is empty.

Example:

>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
┌─────┐
│ a   │
│ --- │
│ str │
╞═════╡
│ A   │
└─────┘
>>>
>>> tf.item()
>>>
A