egttools.datastructures.DataTable¶
- class DataTable(self: egttools.numerical.numerical_.DataStructures.DataTable, nb_rows: SupportsInt | SupportsIndex, nb_columns: SupportsInt | SupportsIndex, headers: collections.abc.Sequence[str], column_types: collections.abc.Sequence[str])¶
Bases:
pybind11_objectStore tabular data together with column headers and column types.
Create a data table.
- Parameters:
Examples
>>> from egttools.numerical.DataStructures import DataTable >>> table = DataTable( ... 2, ... 2, ... ["name", "value"], ... ["str", "float"] ... )
Methods
Attributes
Number of columns in the table.
Column type labels.
Table contents.
Column names.
Number of rows in the table.
- __init__(self: egttools.numerical.numerical_.DataStructures.DataTable, nb_rows: SupportsInt | SupportsIndex, nb_columns: SupportsInt | SupportsIndex, headers: collections.abc.Sequence[str], column_types: collections.abc.Sequence[str]) None¶
Create a data table.
- Parameters:
Examples
>>> from egttools.numerical.DataStructures import DataTable >>> table = DataTable( ... 2, ... 2, ... ["name", "value"], ... ["str", "float"] ... )
- __new__(**kwargs)¶
- __annotations__ = {}¶
- property cols¶
Number of columns in the table.
- property column_types¶
Column type labels.
- property data¶
Table contents.
- Returns:
Two-dimensional array storing the table values.
- Return type:
- property rows¶
Number of rows in the table.