tiled.adapters.csv.CSVAdapter
- class tiled.adapters.csv.CSVAdapter(data_uris: Iterable[str], structure: TableStructure | None = None, 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, **kwargs: Any | None)[source]
Adapter for tabular data stored as partitioned text (csv) files
- __init__(data_uris: Iterable[str], structure: TableStructure | None = None, 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, **kwargs: Any | None) None [source]
Adapter for partitioned tabular data stored as a sequence of text (csv) files
- Parameters:
- data_urislist of uris to csv files
- structure
- metadata
- specs
- kwargsdict
any keyword arguments that can be passed to the pandas.read_csv function, e.g. names, sep, dtype, etc.
Methods
__init__
(data_uris[, structure, metadata, specs])Adapter for partitioned tabular data stored as a sequence of text (csv) files
append_partition
(data, partition)Append data to an existing partition
from_catalog
(data_source, node, /, **kwargs)from_uris
(*data_uris, **kwargs)generate_data_sources
(mimetype, ...)get
(key)init_storage
(data_uri, structure)Initialize partitioned csv storage
items
()Iterator over table columns
metadata
()read
([fields])read_partition
(indx[, fields])Read a single partition
structure
()write
(data)Default writing function to a dataset with a single partition
write_partition
(data, partition)Write data to a new partition or overwrite an existing one
Attributes
structure_family