holoviews.core.data.narwhals module#

class holoviews.core.data.narwhals.NarwhalsInterface(*, name)[source]#

Bases: Interface

Attributes:
narwhals_backend

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.

compute(dataset)

Should return a computed version of the Dataset.

select_mask(dataset, selection)

Given a Dataset object and a dictionary with dimension keys and selection keys (i.e. tuple ranges, slices, sets, lists.

unpack_scalar(dataset, data)

Given a dataset object and data in the appropriate format for the interface, return a simple scalar.

add_dimension

aggregate

assign

concat

concat_fn

dframe

dimension_type

dtype

groupby

histogram

iloc

init

isscalar

length

mask

nonzero

range

redim

reindex

sample

select

shape

sort

validate

values

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 compute(dataset)[source]#

Should return a computed version of the Dataset.

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.

classmethod unpack_scalar(dataset, data)[source]#

Given a dataset object and data in the appropriate format for the interface, return a simple scalar.