Skip to main content

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

Project description

Markdown

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

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 = {
    'ID_Cliente': range(1, 1001),
    'Valor_Compra': np.random.rand(1000) * 1000,
    'Idade': np.random.randint(18, 70, 1000),
    'Regiao': 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_exemplo = 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_exemplo,
    sort_by="Valor_Compra",
    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.1.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.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tableplot-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 4c73acd4e5cb6b713b76a7bcdb118899a04e8cbf1aae36de6ba04c9aa10e6fd9
MD5 34f77c51946699961ffe3c8eeebad383
BLAKE2b-256 54380b1921bc1e3ef04474225ec3ba942d713871b5fac5697817b1203b066785

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tableplot-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5ef0ab9d459b74ed8760efadae7be3e6cad66f8d739df4e6950aba092f05d94d
MD5 2c2e56eceb81b9ce192f03e5d403dbec
BLAKE2b-256 23d1c5a3ad7f7abd64192a98d70b02c1dba38679b03fb3845a67cb4064c42800

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