Crates.io | polars-view |
lib.rs | polars-view |
version | 0.49.3 |
created_at | 2025-03-06 21:11:59.192256+00 |
updated_at | 2025-08-16 15:29:36.594702+00 |
description | A fast and interactive viewer for CSV, Json and Parquet data. |
homepage | https://github.com/claudiofsr/polars-view |
repository | https://github.com/claudiofsr/polars-view |
max_upload_size | |
id | 1581817 |
size | 740,590 |
A fast and interactive viewer for CSV, JSON (including Newline-Delimited JSON - NDJSON), and Apache Parquet files, built with Polars and egui.
This project is inspired by and initially forked from the parqbench project.
Supports sorting by multiple columns simultaneously: Click column header icons to sort the entire DataFrame asynchronously. The order of clicks determines sort precedence. The 5-state cycle for each column controls direction and null placement:
↕
: Not Sorted⏷
: Descending, Nulls First⏶
: Ascending, Nulls First⬇
: Descending, Nulls Last⬆
: Ascending, Nulls Last↕
: Back to Not Sorted(Numbers indicate sort precedence if multiple columns are sorted)
Customizable Header: Toggle visual style ("Enhanced Header"), adjust vertical padding ("Header Padding").
Column Sizing: Choose automatic content-based sizing ("Auto Col Width": true) or faster fixed initial widths ("Auto Col Width": false). Manually resize columns by dragging separators.
--regex
(-r
) argument to select string columns (via wildcard *
or a ^...$
regex pattern matching column names) containing European-style numbers (e.g., '1.234,56') and convert them to standard Float64 format (e.g., 1234.56) on load.Prerequisites:
Clone the Repository:
git clone https://github.com/claudiofsr/polars-view.git
cd polars-view
Build and Install (Release Mode):
# Build with default features (uses 'format-simple')
cargo b -r && cargo install --path=.
# --- OR Build with Specific Features ---
# Example: Build with 'format-special' (formats 'Alíq'/'Aliq' columns differently)
cargo b -r && cargo install --path=. --features format-special
This compiles optimized code and installs the polars-view
binary to ~/.cargo/bin/
.
Run:
polars-view [path_to_file] [options]
If [path_to_file]
is provided (CSV, JSON, NDJSON, Parquet), it's loaded on startup.
Run polars-view --help
for command-line options (--delimiter
, --exclude-null-cols
, --null-values
, --query
, --regex
, --table-name
).
Logging/Tracing: Control log detail using the RUST_LOG
environment variable (values: error
, warn
, info
, debug
, trace
). Remember to export
it before running:
# Example: Run with debug level logging
export RUST_LOG=debug
polars-view data.parquet
Examples:
polars-view sales_data.parquet
polars-view --delimiter="|" transactions.csv --null-values="N/A,-"
polars-view data.csv -q "SELECT category, SUM(value) AS total FROM AllData GROUP BY category"
# Normalize Euro numbers in columns matching "^Value.*$"
polars-view data.csv --regex "^Value.*$"
# Normalize Euro numbers in ALL string columns (Use with caution!)
polars-view data.csv -r "*"
# Use backticks/quotes for names with spaces/special chars
polars-view items.csv -q "SELECT \`Item Name\`, Price FROM AllData WHERE Price > 100.0"
polars-view logs.ndjson -q 'SELECT timestamp, message FROM AllData WHERE level = "ERROR"'
# Exclude all null columns on load
polars-view big_dataset.parquet --exclude-null-cols
AllData
). Click "Apply SQL Commands". See examples or Polars SQL docs.eframe
, egui
, egui_extras
polars
(with features like lazy
, csv
, json
, parquet
, sql
)tokio
(with features like rt
, sync
, rt-multi-thread
)clap
, anstyle
rfd
tracing
, tracing-subscriber
regex
, thiserror
, cfg-if
, env_logger
(non-wasm)This project is licensed under the MIT License.