Skip to main content

A Python tool for creating interactive and dynamic tableplot-style visualizations.

Project description

Interactive Python Tableplot

A Python package for generating interactive tableplot-style visualizations, inspired by the tabplot functionality in R. Visualize the distribution and behavior of your variables along an ordering axis, with support for both numerical and categorical data.

Installation

You can install tableplot directly via pip:

pip install tableplot
How to Use
Here is a basic example of how to use the package to generate a complete tableplot with a single call:

python
Copiar
Editar
import pandas as pd
import numpy as np  # Necessary for the dummy data example

# Import the main function from your package
from tableplot import tableplot

# 1. Load your data (example with a dummy DataFrame)
# df = pd.read_excel("path/to/your_data.xlsx")
# If you have a CSV file, use: df = pd.read_csv("path/to/your_data.csv")
# Or create an example DataFrame for testing:
data = {
    'Customer_ID': range(1, 1001),
    'Purchase_Value': np.random.rand(1000) * 1000,
    'Age': np.random.randint(18, 70, 1000),
    'Region': np.random.choice(['North', 'South', 'East', 'West'], 1000),
    'Subscriber': np.random.choice([True, False, np.nan], 1000, p=[0.45, 0.45, 0.1]),
    'Product_Category': np.random.choice(['Electronics', 'Clothing', 'Food', 'Services', 'Others'], 1000)
}
df_example = pd.DataFrame(data)

# 2. Generate and display the interactive tableplot
# sort_by: Numerical or categorical column to order the bins.
# nbins: Number of slices (bins) into which the dataset will be divided (for numerical columns).
# decreasing: True to sort in decreasing order, False for increasing.
# max_levels: Category limit for categorical columns (less frequent categories will be grouped into 'Others').
# title: The title that will appear at the top of your chart.
tableplot(
    df_example,
    sort_by="Purchase_Value",
    nbins=100,
    decreasing=False,
    max_levels=10,
    title="Example Dataset Tableplot (Ordered by Purchase Value)"
)
Contribution
Contributions are welcome! If you have suggestions, find issues, or want to add new features, please open an issue or pull request on the project's GitHub repository.

License
This project is licensed under the MIT License. See the LICENSE file for more details.

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

tableplot-0.0.3.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

tableplot-0.0.3-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file tableplot-0.0.3.tar.gz.

File metadata

  • Download URL: tableplot-0.0.3.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.3 Windows/11

File hashes

Hashes for tableplot-0.0.3.tar.gz
Algorithm Hash digest
SHA256 65ad9cb15c9490d110d8fcbf8d271958995999ca54cb400d40af46b2fbef5216
MD5 509013bdd12250082b4643594110893a
BLAKE2b-256 67e51033fea7c96f4ebe7a2f0c1ac34e5eaa3a21cc568516f45a2023e3fda434

See more details on using hashes here.

File details

Details for the file tableplot-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: tableplot-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.3 Windows/11

File hashes

Hashes for tableplot-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4a64362cbd54f6eb9af7551198973f589cb810b7d89da017efef5c7e7a7e7853
MD5 dcdaab1fde8824574795722e327b21e2
BLAKE2b-256 274ea90cf0105d552c3e1d858df63324a8c391c620d1074f864adaad185fcd20

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