## Table Creation Example
The `Table` class allows you to create and print structured tables with headers and rows.
### Example:
```python
from prettyprintplus import Table
# Define table headers
table = Table(headers=["Name", "Age", "City"])
# Add rows to the table
table.add_row(["Alice", "30", "New York"])
table.add_row(["Bob", "25", "Los Angeles"])
# Access specific data
print(table.get_row(1)) # Outputs: ['Bob', '25', 'Los Angeles']
print(table.get_column("City")) # Outputs: ['New York', 'Los Angeles']
# Print the table
table.print()
Raw data
{
"_id": null,
"home_page": "https://github.com/hridesh-net/prettyprintplus.git",
"name": "prettyprintplus",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "prettyprintplus print table docs pprint dataset beautify",
"author": "Hridesh",
"author_email": "hridesh.khandal@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/16/87/7769107e45822aed06a28586ee8a575c15f1ab69482402a0d4dc838e87ba/prettyprintplus-0.1.1.tar.gz",
"platform": null,
"description": "## Table Creation Example\n\nThe `Table` class allows you to create and print structured tables with headers and rows.\n\n### Example:\n\n```python\nfrom prettyprintplus import Table\n\n# Define table headers\ntable = Table(headers=[\"Name\", \"Age\", \"City\"])\n\n# Add rows to the table\ntable.add_row([\"Alice\", \"30\", \"New York\"])\ntable.add_row([\"Bob\", \"25\", \"Los Angeles\"])\n\n# Access specific data\nprint(table.get_row(1)) # Outputs: ['Bob', '25', 'Los Angeles']\nprint(table.get_column(\"City\")) # Outputs: ['New York', 'Los Angeles']\n\n# Print the table\ntable.print()\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python package for beautifying terminal output and tables",
"version": "0.1.1",
"project_urls": {
"Bug Tracker": "https://github.com/hridesh-net/prettyprintplus/projects?query=is%3Aopen",
"Homepage": "https://github.com/hridesh-net/prettyprintplus.git"
},
"split_keywords": [
"prettyprintplus",
"print",
"table",
"docs",
"pprint",
"dataset",
"beautify"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a01b3df8fe9b7ea2729b9dcb7d9b5f0f49bad85325746ef6f0326d6d7070e649",
"md5": "a316f5c654509839176e66c56ad17a67",
"sha256": "3dbfab675d151695f82c70ef09ec073c01e4b3ae54371706aa10a100e6824eee"
},
"downloads": -1,
"filename": "prettyprintplus-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a316f5c654509839176e66c56ad17a67",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 2420,
"upload_time": "2024-09-20T18:49:36",
"upload_time_iso_8601": "2024-09-20T18:49:36.709301Z",
"url": "https://files.pythonhosted.org/packages/a0/1b/3df8fe9b7ea2729b9dcb7d9b5f0f49bad85325746ef6f0326d6d7070e649/prettyprintplus-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "16877769107e45822aed06a28586ee8a575c15f1ab69482402a0d4dc838e87ba",
"md5": "f608043566e6d5291bde62dc10841b8a",
"sha256": "198b6b68ca0f52086118197549f8b253f02c2ad565dfa5a9756a0aca7d25012b"
},
"downloads": -1,
"filename": "prettyprintplus-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "f608043566e6d5291bde62dc10841b8a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 2440,
"upload_time": "2024-09-20T18:49:38",
"upload_time_iso_8601": "2024-09-20T18:49:38.632641Z",
"url": "https://files.pythonhosted.org/packages/16/87/7769107e45822aed06a28586ee8a575c15f1ab69482402a0d4dc838e87ba/prettyprintplus-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-20 18:49:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hridesh-net",
"github_project": "prettyprintplus",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "prettyprintplus"
}