Skip to main content

Extends `head` and `tail` commands to support previewing binary data formats

Project description

Mitchell P. Krawiec-Thayer

This library provides headx and tailx commands which behave similarly to the head and tail commands, extended with support for binary data formats.

Supported file types include:

  • Feather files

  • Pickle files

  • Parquet files

  • HDF5 files

  • XLSX

Example

Let’s compare head and headx for a Feather file. Here’s the standard head command:

$ head test.feather -n 4

ARROW1����H

The above output is binary data, which is not very useful. Now let’s try headx:

$ headx -n 4 data.feather

 timestamp  flavor color  foobar
    10 strange   red       9
    20      up  blue       8
    30   charm  None       7

Installation

To install headtailx, simply run:

pip install headtailx

Use

Simply replace head with headx (and likewise tail -> tailx) when previewing binary data formats. For example headx <filename> -n 3 would show the first 3 lines.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

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

headtailx-0.0.1.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

headtailx-0.0.1-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page