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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file selectsampler-0.0.1.tar.gz.

File metadata

  • Download URL: selectsampler-0.0.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for selectsampler-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a7df01995afd051b1e6516a497f9be8e38cc547ced60f682562611ba7d8f196b
MD5 c7f5b97a1f85300512840ddd2b7f45ef
BLAKE2b-256 9cc61e1608a8cb3d680e64c9b36b5f65a83bef892e3676b0f7aeabf96ae5dd25

See more details on using hashes here.

File details

Details for the file SelectSampler-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: SelectSampler-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for SelectSampler-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5891e69f6de068a7425a550e26d3014f1c85f24eb14db95b59af4aa901a9332d
MD5 a111bb63b50838c9d6d311b91d8f2bc7
BLAKE2b-256 dc979e2550e9de60c99460c8e1e620896523995fac3d12b2285a9fd360e8d25c

See more details on using hashes here.

Supported by

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