Skip to main content

A cross-platform data pretty printer that uses column styling to maximize viewer enjoyment. Supports CSV, Parquet, Pandas, and Polars DataFrames.

Project description

Tidy Viewer Py

Installation

pip install tidy-viewer-py

Quick Start

CSV File Pretty Printing

import tidy_viewer_py as tv
import pandas as pd
url = "https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv"
pd.read_csv(url).to_csv("iris.csv", index=False)  # Save to csv for demo
filename = "iris.csv"
tv.print_csv(filename)

Pandas DataFrames Pretty Printing

import pandas as pd
import tidy_viewer_py as tv
df = pd.read_csv(filename)
tv.print_dataframe(df)

Polars DataFrames Pretty Printing

import polars as pl

df_pl = pl.read_csv(filename)
tv.print_polars_dataframe(df_pl)

Method Chaining API

import tidy_viewer_py as tv

tv.tv().color_theme("gruvbox").max_rows(10).print_dataframe(df)

Configuration Options

options = tv.FormatOptions(
    # Display options
    max_rows=25,              # Maximum rows to display (None for all)
    max_col_width=20,         # Maximum column width
    min_col_width=2,          # Minimum column width
    
    # Styling
    use_color=True,           # Enable/disable colored output
    color_theme="nord",       # Color theme
    
    # Data formatting
    delimiter=",",            # CSV delimiter
    significant_figures=3,    # Number of significant figures
    preserve_scientific=False,# Preserve scientific notation
    max_decimal_width=13,     # Max width before scientific notation
    
    # Table elements
    no_dimensions=False,      # Hide table dimensions
    no_row_numbering=False,   # Hide row numbers
    title="My Table",         # Table title
    footer="End of data",     # Table footer
)

Color Themes

Available themes:

  • nord (default) - Arctic, north-bluish color palette
  • gruvbox - Retro groove color scheme
  • dracula - Dark theme with vibrant colors
  • one_dark - Atom One Dark inspired
  • solarized_light - Precision colors for readability

Building from Source

Requirements:

  • Python 3.8+
  • Rust 1.70+
  • uv (recommended) or pip
git clone https://github.com/yourusername/tidy-viewer-py
cd tidy-viewer-py
uv pip install .

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

tidy_viewer_py-0.2.96.tar.gz (109.7 kB view details)

Uploaded Source

Built Distribution

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

tidy_viewer_py-0.2.96-cp313-cp313-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

File details

Details for the file tidy_viewer_py-0.2.96.tar.gz.

File metadata

  • Download URL: tidy_viewer_py-0.2.96.tar.gz
  • Upload date:
  • Size: 109.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.3

File hashes

Hashes for tidy_viewer_py-0.2.96.tar.gz
Algorithm Hash digest
SHA256 b0690c8784817ebd6258e87494c2ab9b92a82c04e1861e61e95dfdc10dab6ea1
MD5 22c603930cef113357de3bfc53404aea
BLAKE2b-256 2c8a99e364bc5df231abf3ea5d466948513682d78d5ce4f8df90963c1277a42e

See more details on using hashes here.

File details

Details for the file tidy_viewer_py-0.2.96-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tidy_viewer_py-0.2.96-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7b20f14c2c72715ac4b7d72357c96c9a3a766d379d81a31458538bd825af84ec
MD5 b54f9a6e4b5e6733a85b83b242ae82f8
BLAKE2b-256 34f030f940bf66039d4292136d728a8275e500cb93192b34633ac7bc53d9629a

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