This package allows you to fetch the dataset samples from the holoviews scatterplot as a dataframe.
Project description
SelectSampler package
This package allows you to fetch the dataset samples from the holoviews scatterplot as a dataframe. It only works in Jupyter notebook environment. An example usage is the following:
import numpy as np
sampler = ScatterSampler()
# Arbitrary datasets for demonstration
mat = np.random.randint(0, 100, (100, 2))
df = pd.DataFrame(mat, columns=['x', 'y'])
sampler.setup_holoviews()
sampler.setup_scatter(df, 'x', 'y')
scatter_chart = sampler.show_scatter_chart()
scatter_chart
sampler.extract_df()
Steps:
- Run sampler.setup_holoviews() first to ensure you have the bokeh extension installed.
- Then run sampler.setup_scatter(df, 'x', 'y') to setup the scatter plot.
- Run sampler.show_scatter_chart() to display the scatter plot. You can select the samples on the sidebars of the scatter plot.
- Finally, run sampler.extract_df() to get the selected samples in a dataframe (you need to run this in the separate cell).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
selectsampler-0.0.1.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for SelectSampler-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5891e69f6de068a7425a550e26d3014f1c85f24eb14db95b59af4aa901a9332d |
|
MD5 | a111bb63b50838c9d6d311b91d8f2bc7 |
|
BLAKE2b-256 | dc979e2550e9de60c99460c8e1e620896523995fac3d12b2285a9fd360e8d25c |