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.3.tar.gz (4.1 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.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dfpeek-0.1.3.tar.gz
  • Upload date:
  • Size: 4.1 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.3.tar.gz
Algorithm Hash digest
SHA256 fcca97f19d20143565a08bfb50ef3471b7935f26f07acc625da1167e8a07246c
MD5 53c754ae440daa3965732535dcbb035e
BLAKE2b-256 dd0f16c1f8a9a25d67e3411dda5171d84e2bdd9159d714d12c722be7f809f8da

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dfpeek-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 970c908e66264f1d06f933fae0f759b473c8ac7014206efd91e8a4117d09e49b
MD5 73dad9134cc708cdb70f3a30b23be749
BLAKE2b-256 b02400979ec7bff9793eafd2bd5e0ca8d05e851aeae2c85e1b9bb51e37ec0ced

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