Skip to main content

View your data frames in a browser

Project description

Tablescope

A lightweight tool for viewing DataFrames in your browser using Tabulator.js. Supports any DataFrame types that are compatible with Narwhals, including pandas and Polars.

Features

  • Interactive table view of your DataFrame
  • Full-text search across all columns
  • Column-specific filters
  • Column sorting and reordering
  • Cell editing (double-click to edit)
  • Export to CSV or JSON

Installation

pip install tablescope

Usage

Python API

Here's a simple example using a Polars DataFrame:

import polars as pl
from tablescope import show

df = pl.DataFrame({
    'name': ['Alice', 'Bob', 'Charlie'],
    'age': [25, 30, 35],
    'city': ['New York', 'London', 'Paris']
})

# Open the table in your browser
show(df)

Command Line Interface

You can also use tablescope from the command line by piping JSON data to it:

# View a JSON array of objects
echo '[{"name": "Alice", "age": 25}, {"name": "Bob", "age": 30}]' | tablescope

# Or pipe from a JSON file
cat data.json | tablescope

The CLI accepts JSON input from stdin and displays it in your browser using the same interactive table interface.

Development

To set up the development environment:

  1. Clone the repository
  2. Install development dependencies:
rye sync
  1. Download Tabulator.js files:
  2. Download the required Tabulator.js files:
wget https://unpkg.com/tabulator-tables@6.3.1/dist/js/tabulator.min.js -O static/tabulator.min.js
wget https://unpkg.com/tabulator-tables@6.3.1/dist/css/tabulator.min.css -O static/tabulator.min.css

License

MIT License

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

tablescope-0.1.8.tar.gz (116.1 kB view details)

Uploaded Source

Built Distribution

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

tablescope-0.1.8-py3-none-any.whl (118.5 kB view details)

Uploaded Python 3

File details

Details for the file tablescope-0.1.8.tar.gz.

File metadata

  • Download URL: tablescope-0.1.8.tar.gz
  • Upload date:
  • Size: 116.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for tablescope-0.1.8.tar.gz
Algorithm Hash digest
SHA256 239aa7733439c46b5efd4b528d2d7019b0a42bbd2278cbdbcb9238c49b1bbb5b
MD5 5478ef0afa242ee18b15e5387a9cee1d
BLAKE2b-256 6228290a85f140b5d6956275ed4d55baec260baee72cf78f8108bdb4e4d100d0

See more details on using hashes here.

File details

Details for the file tablescope-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: tablescope-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 118.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for tablescope-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2f6f8d7c0f24119b53f5d3631f6d362cb49823efefc184eb9dc3e38a19b26988
MD5 a44e8ed299c31566039733719aa206c3
BLAKE2b-256 a9fd8ef4935973f7df233022cf19cd853d39e270ee2f50e8190f79e98960727d

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