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
- Attributes:
- datatype
Methods
applies
(obj)Indicates whether the interface is designed specifically to handle the supplied object's type.
as_dframe
(dataset)Returns the data of a Dataset as a dataframe avoiding copying if it already a dataframe type.
cast
(datasets[, datatype, cast_type])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).
compute
(dataset)Should return a computed version of the Dataset.
concatenate
(datasets[, datatype, new_type])Utility function to concatenate an NdMapping of Dataset objects.
indexed
(dataset, selection)Given a Dataset object and selection to be applied returns boolean to indicate whether a scalar value has been indexed.
isunique
(dataset, dim[, per_geom])Compatibility method introduced for v1.13.0 to smooth over addition of per_geom kwarg for isscalar method.
loaded
()Indicates whether the required dependencies are loaded.
persist
(dataset)Should return a persisted version of the Dataset.
replace_value
(data, nodata)Replace nodata value in data with NaN
select_mask
(dataset, selection)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.
array
columns
dframe
dtype
error
expanded
has_holes
histogram
holes
initialize
isscalar
length
nonzero
range
redim
reduce
register
shape
validate
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 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.
- 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 theDataset.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 theDataset.ndloc
property docstring.