## io.from_frame()


A source that reads the whole table on every refresh: [fn()](sql.Dialect.md#sverify.sql.Dialect.fn) returns


Usage

``` python
io.from_frame(
    fn,
    *,
    name,
    schema=None,
)
```


it. Each read is diffed against the last, so the nodes reading it get the exact change and nothing is assumed; a read that changes nothing is no new version.


## Parameters


`fn: Callable[[], Any]`  
Returns the table (an Arrow table, a Polars or pandas DataFrame, …), or None if it is not there.

`name: str`  
The table's name in the plans that read it.

`schema: pa.Schema | None = None`  
The table's schema, if [fn()](sql.Dialect.md#sverify.sql.Dialect.fn) may return None. Default: that of the first read.


## Returns


`Source`  
The source.


## Examples

``` python
import pyarrow as pa
from sverify.io import from_frame

regions = from_frame(
    lambda: pa.table({"customer": ["ada"], "region": ["eu"]}), name="regions"
)
```
