tiled.adapters.table.TableAdapter
- class tiled.adapters.table.TableAdapter(partitions: DataFrame | DataFrame, structure: TableStructure, *, metadata: Dict[str, str | int | float | bool | Dict[str, Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]] | List[Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]]] | None = None, specs: List[Spec] | None = None, access_policy: AccessPolicy | None = None)[source]
Wrap a dataframe-like object in an interface that Tiled can serve.
Examples
>>> df = pandas.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]}) >>> DataFrameAdapter.from_pandas(df, npartitions=1)
- __init__(partitions: DataFrame | DataFrame, structure: TableStructure, *, metadata: Dict[str, str | int | float | bool | Dict[str, Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]] | List[Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]]] | None = None, specs: List[Spec] | None = None, access_policy: AccessPolicy | None = None) None [source]
- Parameters:
- partitions
- structure
- metadata
- specs
- access_policy
Methods
__init__
(partitions, structure, *[, ...])from_dask_dataframe
(ddf[, metadata, specs, ...])from_dict
(*args[, metadata, specs, ...])from_pandas
(*args[, metadata, specs, ...])items
()metadata
()read
([fields])read_partition
(partition[, fields])structure
()Attributes
structure_family