tabledata

1.3.4 · active · verified Fri Apr 10

tabledata is a Python library designed to represent tabular data programmatically. It serves as a foundational component for other libraries by the same author, such as pytablewriter, pytablereader, and SimpleSQLite. The library is actively maintained, with its current version being 1.3.4, and receives regular updates.

Warnings

Install

Imports

Quickstart

Creates a TableData object to represent tabular data with a name, headers, and rows, then demonstrates basic access to its components.

from tabledata import TableData

table_name = "users"
headers = ["ID", "Name", "Email"]
rows = [
    [1, "Alice", "alice@example.com"],
    [2, "Bob", "bob@example.com"],
    [3, "Charlie", "charlie@example.com"]
]

table = TableData(table_name, headers, rows)

print(f"Table Name: {table.table_name}")
print(f"Headers: {table.headers}")
for row in table.rows:
    print(f"Row: {row.data}")

# Accessing data (example)
print(f"First user's name: {table.rows[0].get_value_by_name('Name')}")

view raw JSON →