tiled.adapters.table.TableAdapter

class tiled.adapters.table.TableAdapter(partitions: DataFrame | DataFrame, structure: TableStructure, *, metadata: Mapping[str, str | int | float | Mapping[str, JSON_ITEM] | Sequence[JSON_ITEM] | None] | None = None, specs: List[Spec] | 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: Mapping[str, str | int | float | Mapping[str, JSON_ITEM] | Sequence[JSON_ITEM] | None] | None = None, specs: List[Spec] | None = None) None[source]
Parameters:
partitions
structure
metadata
specs

Methods

__class_getitem__

Parameterizes a generic class.

__delattr__(name, /)

Implement delattr(self, name).

__dir__(/)

Default dir() implementation.

__eq__(value, /)

Return self==value.

__format__(format_spec, /)

Default object formatter.

__ge__(value, /)

Return self>=value.

__getattribute__(name, /)

Return getattr(self, name).

__getitem__(key)

__getstate__(/)

Helper for pickle.

__gt__(value, /)

Return self>value.

__hash__(/)

Return hash(self).

__init__(partitions, structure, *[, ...])

__init_subclass__

Function to initialize subclasses.

__le__(value, /)

Return self<=value.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

__new__(*args, **kwargs)

__reduce__(/)

Helper for pickle.

__reduce_ex__(protocol, /)

Helper for pickle.

__repr__()

Return repr(self).

__setattr__(name, value, /)

Implement setattr(self, name, value).

__sizeof__(/)

Size of object in memory, in bytes.

__str__(/)

Return str(self).

__subclasshook__

Abstract classes can override this to customize issubclass().

from_dask_dataframe(ddf, *[, metadata, specs])

from_dict(*args[, metadata, specs, npartitions])

from_pandas(*args[, metadata, specs, ...])

get(key)

items()

metadata()

read([fields])

read_partition(partition[, fields])

structure()

supported_storage()

Attributes

__abstractmethods__

__annotations__

__dict__

__doc__

__module__

__orig_bases__

__parameters__

__slots__

__weakref__

list of weak references to the object

_abc_impl

specs

structure_family