You need do install the library (https://pypi.org/project/PrettyTable/) via pip, since you are using python3.7, use pip3.7
pip3.7 install prettytable
Then it should work
$ python3.7
>>> from prettytable import PrettyTable
>>>
Answer from Devesh Kumar Singh on Stack OverflowPyPI
pypi.org › project › prettytable
prettytable · PyPI
A simple Python library for easily displaying tabular data in a visually appealing ASCII table format
» pip install prettytable
GitHub
github.com › lmaurits › prettytable
GitHub - lmaurits/prettytable: Automatically exported from code.google.com/p/prettytable · GitHub
= Displaying your table in ASCII form = PrettyTable's main goal is to let you print tables in an attractive ASCII form, like this: +-----------+------+------------+-----------------+ | City name | Area | Population | Annual Rainfall | +-----------+------+------------+-----------------+ | Adelaide | 1295 | 1158259 | 600.5 | | Brisbane | 5905 | 1857594 | 1146.4 | | Darwin | 112 | 120900 | 1714.7 | | Hobart | 1357 | 205556 | 619.5 | | Melbourne | 1566 | 3806092 | 646.9 | | Perth | 5386 | 1554769 | 869.4 | | Sydney | 2058 | 4336374 | 1214.8 | +-----------+------+------------+-----------------+ You can print tables like this to `stdout` or get string representations of them.
Starred by 31 users
Forked by 6 users
Languages Python
Videos
02:06
PrettyTable Make Beautiful Tables in Python - YouTube
08:25
Python(Creating A Table Using The PrettyTable Library/Module) - ...
03:27
Create a simple table using PrettyTable Python Library - YouTube
Python Pip install and pretty table : Python programming for ...
07:10
Create Tables in Python language Using PrettyTable Library - YouTube
Google Code
code.google.com › archive › p › prettytable › wikis › Tutorial.wiki
prettytable - Tutorial.wiki
Archive · Skip to content · The Google Code Archive requires JavaScript to be enabled in your browser · Google · About Google · Privacy · Terms
Readthedocs
ptable.readthedocs.io › en › latest › tutorial.html
Tutorial — PTable 0.9.0 documentation
By default, PrettyTable produces ASCII tables that look like the ones used in SQL database shells. But if can print them in a variety of other formats as well. If the format you want to use is common, PrettyTable makes this very easy for you to do using the set_style method.
Debian
packages.debian.org › sid › python3-prettytable
Debian -- Details of package python3-prettytable in sid
PrettyTable is a simple Python library designed to make it quick and easy to represent tabular data in visually appealing ASCII tables. It was inspired by the ASCII tables used in the PostgreSQL shell psql.
PyPI
pypi.org › project › prettyTables
prettyTables · PyPI
This is a python package that aims to provide a simple and pretty way of printing tables to the console making use of a class.
» pip install prettyTables
Google Code
code.google.com › archive › p › prettytable
PrettyTable
Archive · Skip to content · The Google Code Archive requires JavaScript to be enabled in your browser · Google · About Google · Privacy · Terms
Experts Exchange
experts-exchange.com › questions › 28583878 › python-prettytable.html
Solved: python prettytable | Experts Exchange
December 19, 2014 - Your comment on rows prompted me to re-look only to notice I hadn't wrapped the values in the output.txt, which have white spaces, in hyphens , but that's not what i'm after - I don't want to display the output.txt in prettytables, but rather use the strings (rows) in output.txt to open up other csv files.
Anaconda.org
anaconda.org › conda-forge › prettytable
prettytable - conda-forge | Anaconda.org
Install prettytable with Anaconda.org. A simple Python library for easily displaying tabular data in a visually appealing ASCII table format
openSUSE
build.opensuse.org › projects › openSUSE:Factory › packages › python-prettytable › files › python-prettytable.spec
File python-prettytable.spec of Package ...
The openSUSE Build Service is the public instance of the Open Build Service (OBS) used for development of the openSUSE distribution and to offer packages from same source for Fedora, Debian, Ubuntu, SUSE Linux Enterprise and other distributions · Please find further details of this service ...
Repology
repology.org › project › python:prettytable › versions
python:prettytable package versions - Repology
List of package versions for project python:prettytable in all repositories
Fedora
packages.fedoraproject.org › pkgs › python-prettytable
python-prettytable - Fedora Packages
python3-prettytable - Python library to display tabular data in tables ·
GitHub
github.com › prettytable › prettytable › releases
Releases · prettytable/prettytable
Add demo to __main__: python -m prettytable (#347) @hugovk · Update Ruff: more f-strings and sort __all__ (#348) @hugovk · Fix default styles not being reset between set_style() calls (#344) @MonstersInc-sudo · Fix add_autoindex alignment for HTML (#345) @stuertz ·
Author prettytable
Steemit
steemit.com › utopianio › @rohancmr › create-readable-cli-table-using-python-s-prettytable-library
Create readable CLI table using Python's PrettyTable library — Steemit
January 10, 2018 - Using PrettyTable python library we can quickly and easily represent tabular data in nice CLI tables. Apart from above examples, it can be used for printing range of rows or selected columns.
OpenEmbedded
layers.openembedded.org › layerindex › recipe › 101968
OpenEmbedded Layer Index - python-prettytable
warrior · meta-openstack · python-prettytable · python-prettytable 0.7.2 · Sources · Patches · Other branches · This recipe in other branches of meta-openstack: · change history • about this site • FAQ
ZetCode
zetcode.com › python › prettytable
Python PrettyTable - generating tables in Python with PrettyTable
January 29, 2024 - PrettyTable is a Python library for generating simple ASCII tables. It was inspired by the ASCII tables used in the PostgreSQL shell psql. We can control many aspects of a table, such as the width of the column padding, the alignment of text, or the table border.