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:
```bash
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/antoniorodrigues428/tabplot-python",
"name": "tableplot",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.14,>=3.7",
"maintainer_email": null,
"keywords": "tableplot, visualization, data, interactive, plotly, pandas, data analysis",
"author": "Antonio Rodrigues",
"author_email": "antonioazam@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/4d/a3/e771e97b011798e1d8c50f51e8d36858484660249d1e593b6e1d3d8a490c/tableplot-0.0.2.tar.gz",
"platform": null,
"description": "Markdown\n\n# Interactive Python Tableplot\n\nA 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.\n\n## Installation\n\nYou can install `tableplot` directly via pip:\n\n```bash\npip install tableplot\nHow to Use\nHere is a basic example of how to use the package to generate a complete tableplot with a single call:\n\nPython\n\nimport pandas as pd\nimport numpy as np # Necessary for the dummy data example\n\n# Import the main function from your package.\nfrom tableplot import tableplot\n\n# 1. Load your data (example with a dummy DataFrame)\n# df = pd.read_excel(\"path/to/your_data.xlsx\")\n# If you have a CSV file, use: df = pd.read_csv(\"path/to/your_data.csv\")\n# Or create an example DataFrame for testing:\ndata = {\n 'ID_Cliente': range(1, 1001),\n 'Valor_Compra': np.random.rand(1000) * 1000,\n 'Idade': np.random.randint(18, 70, 1000),\n 'Regiao': np.random.choice(['North', 'South', 'East', 'West'], 1000),\n 'Subscriber': np.random.choice([True, False, np.nan], 1000, p=[0.45, 0.45, 0.1]),\n 'Product_Category': np.random.choice(['Electronics', 'Clothing', 'Food', 'Services', 'Others'], 1000)\n}\ndf_exemplo = pd.DataFrame(data)\n\n# 2. Generate and display the interactive tableplot\n# sort_by: Numerical or categorical column to order the bins.\n# nbins: Number of slices (bins) into which the dataset will be divided (for numerical columns).\n# decreasing: True to sort in decreasing order, False for increasing.\n# max_levels: Category limit for categorical columns (less frequent categories will be grouped into 'Others').\n# title: The title that will appear at the top of your chart.\ntableplot(\n df_exemplo,\n sort_by=\"Valor_Compra\",\n nbins=100,\n decreasing=False,\n max_levels=10,\n title=\"Example Dataset Tableplot (Ordered by Purchase Value)\"\n)\nContribution\nContributions 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.\n\nLicense\nThis project is licensed under the MIT License. See the LICENSE file for more details.",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python tool for creating interactive and dynamic tableplot-style visualizations.",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://github.com/antoniorodrigues428/tabplot-python",
"Repository": "https://github.com/antoniorodrigues428/tabplot-python"
},
"split_keywords": [
"tableplot",
" visualization",
" data",
" interactive",
" plotly",
" pandas",
" data analysis"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "526d3e3cf04302a0b63557a52e26907d1d94f0c22356c228a6e2bd18c1b9a53a",
"md5": "af84085501224792462aaf3bce27bae3",
"sha256": "8f03f688375df0dfab714cd078c2eb0ff3faaa170923e5ee7833cd76c0b3b7ed"
},
"downloads": -1,
"filename": "tableplot-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "af84085501224792462aaf3bce27bae3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.14,>=3.7",
"size": 9972,
"upload_time": "2025-07-08T20:11:40",
"upload_time_iso_8601": "2025-07-08T20:11:40.429496Z",
"url": "https://files.pythonhosted.org/packages/52/6d/3e3cf04302a0b63557a52e26907d1d94f0c22356c228a6e2bd18c1b9a53a/tableplot-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4da3e771e97b011798e1d8c50f51e8d36858484660249d1e593b6e1d3d8a490c",
"md5": "924670aca3b90f78e2b0c263500dcb0a",
"sha256": "cb5e87fffc3ab080f77fa87e21f7719363b80e461af5a806dcd80fd8f93cbcef"
},
"downloads": -1,
"filename": "tableplot-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "924670aca3b90f78e2b0c263500dcb0a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.14,>=3.7",
"size": 9310,
"upload_time": "2025-07-08T20:11:41",
"upload_time_iso_8601": "2025-07-08T20:11:41.609469Z",
"url": "https://files.pythonhosted.org/packages/4d/a3/e771e97b011798e1d8c50f51e8d36858484660249d1e593b6e1d3d8a490c/tableplot-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-08 20:11:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "antoniorodrigues428",
"github_project": "tabplot-python",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "pandas",
"specs": [
[
">=",
"1.5"
]
]
},
{
"name": "numpy",
"specs": [
[
">=",
"1.21"
]
]
},
{
"name": "plotly",
"specs": [
[
">=",
"5.5"
]
]
}
],
"lcname": "tableplot"
}