## Table


A table for a document: labelled columns, rows of plain values, a caption and a source.


Usage

``` python
Table(**data)
```


Values are stored unformatted; the style formats them when the table is rendered, so one style setting changes every table. A missing value is `None`. A [status](Check.md#dazflow.Check.status) column marks pass or fail in place.


## Examples

``` python
>>> t = Table(id="T3.1", caption="Means",
...           columns=[Column(name="x", label="Mean", unit="pp")], rows=[[1.25]])
>>> t.columns[0].heading
```

'Mean (pp)'


## Methods

| Name | Description |
|----|----|
| [from_frame()](#from_frame) | A table from a pandas frame, the column kinds read from the dtypes. |
| [from_gate()](#from_gate) | The gate's checks, one per row, with pass, fail or overridden marked in place. |

------------------------------------------------------------------------


#### from_frame()


A table from a pandas frame, the column kinds read from the dtypes.


Usage

``` python
from_frame(
    frame,
    *,
    id,
    caption,
    labels=None,
    units=None,
    kinds=None,
    index=None,
    notes=(),
    source=None
)
```


Integer columns become `integer`, floats `number`, datetimes `date` and everything else [text](Finding.md#dazflow.Finding.text); `kinds` overrides that. Missing values become empty cells. `index`, when given, names a first column holding the index (periods as `2024Q1`).


------------------------------------------------------------------------


#### from_gate()


The gate's checks, one per row, with pass, fail or overridden marked in place.


Usage

``` python
from_gate(gate, *, id, caption, notes=(), source=None)
```
