holoviews.core.data.interface module#

exception holoviews.core.data.interface.DataError(msg, interface=None)[source]#

Bases: ValueError

DataError is raised when the data cannot be interpreted

class holoviews.core.data.interface.Interface(*, name)[source]#

Bases: Parameterized

Parameter Definitions


classmethod applies(obj)[source]#

Indicates whether the interface is designed specifically to handle the supplied object’s type. By default simply checks if the object is one of the types declared on the class, however if the type is expensive to import at load time the method may be overridden.

classmethod as_dframe(dataset)[source]#

Returns the data of a Dataset as a dataframe avoiding copying if it already a dataframe type.

classmethod cast(datasets, datatype=None, cast_type=None)[source]#

Given a list of Dataset objects, cast them to the specified datatype (by default the format matching the current interface) with the given cast_type (if specified).

classmethod compute(dataset)[source]#

Should return a computed version of the Dataset.

classmethod concatenate(datasets, datatype=None, new_type=None)[source]#

Utility function to concatenate an NdMapping of Dataset objects.

classmethod indexed(dataset, selection)[source]#

Given a Dataset object and selection to be applied returns boolean to indicate whether a scalar value has been indexed.

classmethod isunique(dataset, dim, per_geom=False)[source]#

Compatibility method introduced for v1.13.0 to smooth over addition of per_geom kwarg for isscalar method.

classmethod loaded()[source]#

Indicates whether the required dependencies are loaded.

classmethod persist(dataset)[source]#

Should return a persisted version of the Dataset.

classmethod replace_value(data, nodata)[source]#

Replace nodata value in data with NaN

classmethod select_mask(dataset, selection)[source]#

Given a Dataset object and a dictionary with dimension keys and selection keys (i.e. tuple ranges, slices, sets, lists, or literals) return a boolean mask over the rows in the Dataset object that have been selected.

class holoviews.core.data.interface.iloc(dataset)[source]#

Bases: Accessor

iloc is small wrapper object that allows row, column based indexing into a Dataset using the .iloc property. It supports the usual numpy and pandas iloc indexing semantics including integer indices, slices, lists and arrays of values. For more information see the Dataset.iloc property docstring.

class holoviews.core.data.interface.ndloc(dataset)[source]#

Bases: Accessor

ndloc is a small wrapper object that allows ndarray-like indexing for gridded Datasets using the .ndloc property. It supports the standard NumPy ndarray indexing semantics including integer indices, slices, lists and arrays of values. For more information see the Dataset.ndloc property docstring.