Skip to main content

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:

  1. Run sampler.setup_holoviews() first to ensure you have the bokeh extension installed.
  2. Then run sampler.setup_scatter(df, 'x', 'y') to setup the scatter plot.
  3. Run sampler.show_scatter_chart() to display the scatter plot. You can select the samples on the sidebars of the scatter plot.
  4. Finally, run sampler.extract_df() to get the selected samples in a dataframe (you need to run this in the separate cell).

Project details


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)

Uploaded Source

Built Distribution

SelectSampler-0.0.1-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page