tstore.tswide package#

Submodules#

tstore.tswide.dask module#

Module defining the TSWideDask wrapper.

class tstore.tswide.dask.TSWideDask(*args, **kwargs)[source]#

Bases: TSWide

Wrapper for a long-form Dask timeseries dataframe.

static from_tstore(base_dir: str) TSWideDask[source]#

Open a TStore file structure as a TSWideDask wrapper around a Dask long dataframe.

to_tslong() TSLongDask[source]#

Convert the wrapper into a TSLongDask object.

to_tstore()[source]#

Write the wrapped dataframe as a TStore structure.

tstore.tswide.pandas module#

Module defining the TSWidePandas wrapper.

class tstore.tswide.pandas.TSWidePandas(*args, **kwargs)[source]#

Bases: TSWide

Wrapper for a long-form Pandas timeseries dataframe.

static from_tstore(base_dir: str) TSWidePandas[source]#

Open a TStore file structure as a TSWidePandas wrapper around a Pandas long dataframe.

to_tslong() TSLongPandas[source]#

Convert the wrapper into a TSLongPandas object.

to_tstore()[source]#

Write the wrapped dataframe as a TStore structure.

tstore.tswide.polars module#

Module defining the TSWidePolars wrapper.

class tstore.tswide.polars.TSWidePolars(*args, **kwargs)[source]#

Bases: TSWide

Wrapper for a long-form Polars timeseries dataframe.

static from_tstore(base_dir: str) TSWidePolars[source]#

Open a TStore file structure as a TSWidePolars wrapper around a Polars long dataframe.

to_tslong() TSLongPolars[source]#

Convert the wrapper into a TSLongPolars object.

to_tstore()[source]#

Write the wrapped dataframe as a TStore structure.

tstore.tswide.pyarrow module#

Module defining the TSWidePyArrow wrapper.

class tstore.tswide.pyarrow.TSWidePyArrow(*args, **kwargs)[source]#

Bases: TSWide

Wrapper for a long-form PyArrow timeseries dataframe.

static from_tstore(base_dir: str) TSWidePyArrow[source]#

Open a TStore file structure as a TSWidePyArrow wrapper around a PyArrow long dataframe.

to_tslong() TSLongPyArrow[source]#

Convert the wrapper into a TSLongPyArrow object.

to_tstore()[source]#

Write the wrapped dataframe as a TStore structure.

tstore.tswide.tswide module#

Module defining the TSWide abstract wrapper.

class tstore.tswide.tswide.TSWide(*args, **kwargs)[source]#

Bases: TSWrapper

Abstract wrapper for a wide-form timeseries DataFrame.

to_tsdf() TSDF[source]#

Convert the wrapper into a TSDF object.

abstract to_tslong() TSLong[source]#

Convert the wrapper into a TSLong object.

static wrap(df: DataFrame | GeoDataFrame | DataFrame | DataFrame | Table, *args, **kwargs) TSWide[source]#

Wrap a DataFrame in the appropriate TSWide subclass.

Module contents#

TSWide package.

class tstore.tswide.TSWide(*args, **kwargs)[source]#

Bases: TSWrapper

Abstract wrapper for a wide-form timeseries DataFrame.

to_tsdf() TSDF[source]#

Convert the wrapper into a TSDF object.

abstract to_tslong() TSLong[source]#

Convert the wrapper into a TSLong object.

static wrap(df: DataFrame | GeoDataFrame | DataFrame | DataFrame | Table, *args, **kwargs) TSWide[source]#

Wrap a DataFrame in the appropriate TSWide subclass.

tstore.tswide.open_tswide(base_dir: str | Path, *args, backend: Literal['dask', 'geopandas', 'pandas', 'polars', 'pyarrow'] = 'dask', **kwargs)[source]#

Read a TStore file structure as a TSWide object.