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 palettegruvbox- Retro groove color schemedracula- Dark theme with vibrant colorsone_dark- Atom One Dark inspiredsolarized_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.95.tar.gz
(109.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tidy_viewer_py-0.2.95.tar.gz.
File metadata
- Download URL: tidy_viewer_py-0.2.95.tar.gz
- Upload date:
- Size: 109.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44fc817ecc4eaf89bd8a69afc22ac212059182635379f77d459caf5db38a0193
|
|
| MD5 |
c6555e0045c085a5ebcd03c8e6bcb787
|
|
| BLAKE2b-256 |
57a199594881ffa5310b10bc602417fe5a41965eb18271ae86124f64866bd0a2
|
File details
Details for the file tidy_viewer_py-0.2.95-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: tidy_viewer_py-0.2.95-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dce51e364c4a462a72d3f9edd206388a8ce8e95236d208c8e717c10d4624db3
|
|
| MD5 |
ce339aa3f25fff24e21fcaabdc3349a4
|
|
| BLAKE2b-256 |
84ca399cade09cdb495667c0d8b632fffe51d3aa56c9aa3caa727a8df3a3970a
|