Dataset

Constructors

Dataset(*args[, caseid, alts])

A xarray.Dataset extended interface for use with Larch.

Dataset.from_idca(df[, crack, altnames, ...])

Construct a Dataset from an idca-format DataFrame.

Dataset.from_idce(df[, crack, altnames, ...])

Construct a Dataset from a sparse idca-format DataFrame.

Dataset.from_idco(df[, alts])

Construct a Dataset from an idco-format DataFrame.

Dataset.construct(source[, caseid, alts])

A generic constructor for creating Datasets from various similar objects.

Dataset.from_table(tbl[, index_name, index])

Convert a pyarrow.Table into an xarray.Dataset

Dataset.from_omx(omx[, index_names, ...])

Create a Dataset from an OMX file.

Dataset.from_omx_3d(omx[, index_names, ...])

Create a Dataset from an OMX file with an implicit third dimension.

Dataset.from_zarr(store, *args, **kwargs)

Load and decode a dataset from a Zarr store.

Dataset.from_named_objects(*args)

Create a Dataset by populating it with named objects.

Attributes

Dataset.n_cases

Dataset.n_alts

Dataset.CASEID

Dataset.ALTID

Dataset.alts_mapping

Mapping of alternative codes to names

Dataset.dims

Mapping from dimension names to lengths.

Dataset.sizes

Mapping from dimension names to lengths.

Dataset.data_vars

Dictionary of DataArray objects corresponding to data variables

Dataset.coords

Dictionary of xarray.DataArray objects corresponding to coordinate variables

Dataset.attrs

Dictionary of global attributes on this dataset

Dataset.encoding

Dictionary of global encoding attributes on this dataset

Dataset.indexes

Mapping of pandas.Index objects used for label based indexing.

Dataset.chunks

Mapping from dimension names to block lengths for this dataset's data, or None if the underlying data is not a dask array.

Dataset.chunksizes

Mapping from dimension names to block lengths for this dataset's data, or None if the underlying data is not a dask array.

Dataset.nbytes

Methods

Dataset.caseids()

Access the caseids coordinates as an index.

Dataset.dissolve_zero_variance([dim, inplace])

Dissolve dimension on variables where it has no variance.

Dataset.query_cases(query[, parser, engine])

Return a new dataset with each array indexed along the CASEID dimension.

Dataset.set_altnames(altnames[, inplace])

Set the alternative names for this Dataset.

Dataset.set_dtypes(dtypes[, inplace, on_error])

Set the dtypes for the variables in this Dataset.

Dataset.setup_flow(*args, **kwargs)

Set up a new Flow for analysis using the structure of this DataTree.

Dataset.get_expr(expression)

Access or evaluate an expression.