Niru Maheswaranathan 0c518018a9 Adds support for custom table styles
- Defines a few tablestyles which specify the different box characters
  to use
- Modifies the table, header, and hr functions to take a key that is the
  name of one of these styles (instead of fixed characters)
- Renames frame to dataframe
- Adds some helper functions (top, bottom, and banner) for printing just
  the top or bottom row, or a banner with a given message, using a
  styled table
2016-05-02 19:00:31 -07:00
2015-09-30 13:48:18 -07:00
2015-02-24 13:24:48 -08:00
2015-02-24 12:31:31 -08:00
2015-10-01 10:16:00 -07:00
2016-05-02 14:22:27 -07:00
2015-10-02 10:32:32 -07:00

tableprint

Pretty ASCII printing 📋 of tabular data in python 🐍

PyPi version Documentation Status

Example output

About

tableprint lets you easily print pretty ASCII formatted tables of data. Unlike other modules, you can print single rows of data at a time (useful for printing ongoing computation results).

Installation

pip install tableprint

Usage

The tableprint.table function takes in a matrix of data, a list of headers, and an optional dictionary of parameters. To print a dataset consisting of 10 rows of 3 different columns:

import tableprint
import numpy as np

data = np.random.randn(10,3)
headers = ['Column A', 'Column B', 'Column C']

tableprint.table(data, headers)

The header and row functions allow you to print just the header or just a row of data, respectively, which is useful for continuously updating a table during a long-running computation.

Documentation

Hosted at Read The Docs: tableprint.readthedocs.org

Dependencies

  • Python 2.7 or 3.3+
  • numpy

Version

  • 0.2.0 (May 2 2016) Adds better python2 (unicode/bytes) compatibility
  • 0.1.5 (Oct 1 2015) Renamed hrtime to humantime, added docs
  • 0.1.4 (Sept 28 2015) Added human readable string converter (hrtime)
  • 0.1.0 (Feb 24 2015) Initial release

License

MIT. See LICENSE.md

Description
Pretty console printing 📋 of tabular data in python 🐍
Readme 485 KiB
Languages
Python 98.2%
Makefile 1.8%