Skip to main content

Peek into a dataframe from the command line

Project description

dfpeek

A fast command-line tool for peeking at tabular data files (CSV, TSV, Parquet, Feather, Excel) with concise, chainable options inspired by Unix tools like ls.

Installation

Install from PyPI (recommended):

pip install dfpeek

Or, for Excel/Parquet support:

pip install dfpeek[excel,parquet]

Usage

Run from the command line:

dfpeek <datafile> [options]

Options

Option Description
-h N Show first N rows
-t N Show last N rows
-r START END Show rows in range START to END (zero-based, END excl.)
-u COL Show unique values for column COL
-c COL Show info about column COL (type, nulls, etc.)
-v COL Show value counts for column COL
-s COL Show stats for numerical column COL
-l List column names
-i Show file info (rows, columns, memory usage)
-d DELIM Set delimiter for CSV/TSV files (e.g., , or \t)

All options can be chained in any order.

Examples

Show first 10 rows:

dfpeek data.csv -h 10

Show last 5 rows:

dfpeek data.csv -t 5

Show rows 20 to 30:

dfpeek data.csv -r 20 30

Show unique values for column city:

dfpeek data.csv -u city

Show info about column city:

dfpeek data.csv -c city

Show value counts for column status:

dfpeek data.csv -v status

Show stats for column age:

dfpeek data.csv -s age

List columns:

dfpeek data.csv -l

Show file info:

dfpeek data.csv -i

Show info and first 5 rows (default if no options):

dfpeek data.csv

Use a custom delimiter (e.g., tab):

dfpeek data.tsv -d "\t" -h 5

Supported Formats

  • CSV (.csv)
  • TSV (.tsv)
  • Parquet (.parquet)
  • Feather (.feather)
  • Excel (.xlsx)

Notes

  • For very large files, output may be slow if printing many rows.
  • All rows/columns are shown in full (no abbreviation).
  • Requires Python 3.7+

License

MIT

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

dfpeek-0.1.4.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

dfpeek-0.1.4-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file dfpeek-0.1.4.tar.gz.

File metadata

  • Download URL: dfpeek-0.1.4.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for dfpeek-0.1.4.tar.gz
Algorithm Hash digest
SHA256 396ac08dfb1c63dd1e8928cd5f8aec705900e41260c89fbcdb33d63850c8e968
MD5 679661134f9de646152a711bfa9a1270
BLAKE2b-256 91bd8ab7c66b16a724e6e192151f1bb1a9109c21f03453011f8331938d02bd67

See more details on using hashes here.

File details

Details for the file dfpeek-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: dfpeek-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for dfpeek-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 51b7a87b719ec00d65def31269b396bb2e33f370c3376d6e368459f6ebf4fad9
MD5 9c6450dc4b0c407856a677dd6a2b4f48
BLAKE2b-256 b1cf04d220806bdfe70812dccdf6ebadea09e83b66200b5d7aa67a82eb914fa3

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