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.2.tar.gz (3.3 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.2-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dfpeek-0.1.2.tar.gz
  • Upload date:
  • Size: 3.3 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.2.tar.gz
Algorithm Hash digest
SHA256 9c23ec3d788137f051ac19e3d988b1c1b980db215c9943bfd98b8486a5ed6b4e
MD5 eda60cde3578c214465c784e4c4caaae
BLAKE2b-256 e3b3842da8231e1f4cc51d6dbbc2f5ba7f4c0c83837e68ed03bebe290e34f9e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dfpeek-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4a81641a6706956ae15d3a9754b4ea2a052e569c8f6811e1ed439c98ce679061
MD5 4569b6d1109e77145b5e101e143888b2
BLAKE2b-256 133003472b017dd9cc772eabc4fc521f4c872662601367fe1e1ee42b5b68277a

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