Skip to main content

Search From Plot

概要

散布図または箱ひげ図からデータを抽出することができます
関数を呼び出すと、tkウィンドウが立ち上がります
ウィンドウに表示された図上をドラッグすることで範囲を指定でき、
範囲内にプロットされているデータをDataFrameで受け取ることができます

jupyter notebook上で使うことを想定しています

インストール

$ pip install sfplot

使い方

サンプルデータにirisデータセットを利用します

from sklearn.datasets import load_iris
import seaborn as sns
iris_dataset = sns.load_dataset('iris')
iris_dataset.head(10)

image0

対散布図からデータを抽出

  • pandas DataFrameと、散布図にしたいカラム名を引数にしてSearchFromPlotを起動します
    引数x,yには数値(int, float)型のカラムのみ指定可能です
    import sfplot
    search_result_df = sfplot.scatter(iris_dataset, x='sepal_length', y='sepal_width')
  • ウィンドウが起動します
    image1
  • 取得したいデータの範囲をドラッグします
    image2
  • 「4件取得」と書かれたボタンを押下すると、ウィンドウが閉じ、
    選択範囲内のレコードを抽出したDataFrameを返却します
    search_result_df

    image3

  • 一度に複数回範囲を選択することも可能です
    image4
    image5

箱ひげ図からデータを抽出

  • pandas DataFrameと、箱ひげ図にしたいカラム名を引数にしてSearchFromPlotを起動します
    引数xにはobject型のカラム、引数yには数値(int, float)型のカラムのみ指定可能です
    search_result_df = sfplot.boxplot(iris_dataset, x='species', y='sepal_width')
  • ウィンドウが起動します
    image6
  • 操作方法は対散布図と同様です

Metadata

Release files for sfplot 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sfplot 0.0.1
File Size Uploaded Provenance
sfplot-0.0.1.tar.gz 7.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sfplot 0.0.1
File Interpreter ABI Platform
sfplot-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.8 kB

Release files / sfplot-0.0.1.tar.gz

Download URL sfplot-0.0.1.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
53619bf2a11ea947c33414bc4fce1f7284fbbe6348a58987295693455ddecf2a
BLAKE2b-256 checksum
How to use checksums
21d97cbe63535cb7a93c87d59a2fbb471654406a5bf248b99aee31f26afe45ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

Release files / sfplot-0.0.1-py3-none-any.whl

Download URL sfplot-0.0.1-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95a7cf8e4e986ca8a3995154357bdf2a55e2705e9ca0e079c501ec74449a2af8
BLAKE2b-256 checksum
How to use checksums
73f0eeeea9bebc881b5b199d75e5e6caff86529be469cb555295948fd3e3381d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

Security for sfplot 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page