pandas#

PandasSlicer#

Constructor#

PandasSlicer(data, dims, display_dims, columns)

NDPositionsSlicer subclass that reads positional data from the columns of a pandas.DataFrame instead of an n-dimensional array.

Properties#

PandasSlicer.columns

the columns that hold the coordinates of each graphic, one entry per graphic

PandasSlicer.data

get or set the managed DataFrame, the new DataFrame must have the same columns

PandasSlicer.datapoints_window_func

Get or set the window function applied along the p dim, as (func, apply_dims, window_size).

PandasSlicer.dims

dim names, the same as display_dims since a DataFrame has no other dims

PandasSlicer.display_dims

get or set the spatial dims, in display order

PandasSlicer.display_dims_indices

The ordered spatial dim indices that correspond to the named spatial dims

PandasSlicer.display_window

get or set the display window, in the reference units of the p dim

PandasSlicer.max_display_datapoints

Get or set the maximum number of datapoints to render per graphic.

PandasSlicer.n_slider_dims

number of slider dims, i.e. len(slider_dims).

PandasSlicer.ndim

number of dims, always 3

PandasSlicer.shape

interpreted shape of the data, the number of graphics, the number of rows, and the value dim

PandasSlicer.slider_dims

slider dim names, the non-spatial dims plus the p dim

PandasSlicer.slider_maps

Get or set the per-slider-dim mapping from reference-space values to local array indices, {dim_name: transform}.

PandasSlicer.spatial_func

Get or set the spatial function which is applied on the data slice after the window functions.

PandasSlicer.tooltip

whether tooltip_columns were provided, i.e. whether a custom tooltip is formatted.

PandasSlicer.window_funcs

Get or set the per-slider-dim window functions applied around the current slider position, {dim_name: (func, window_size)}, ex: {"time": (np.mean, 2.5)}.

PandasSlicer.window_order

get or set dimension order in which window functions are applied

Methods#

PandasSlicer.close()

Shut down the thread pool.

PandasSlicer.get(indices)

Get the data slice to display at the given indices.

PandasSlicer.get_window_output(indices)

Take the data slice at the given indices and apply the window functions.

PandasSlicer.set_other_feature(name, value)

set, or clear if value is None, an other graphic feature to window per-datapoint

PandasSlicer.tooltip_format(n, p)

Format the tooltip for a hovered datapoint using the tooltip_columns.