GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • All
  • Best
  • Libs
  • Learn

This view

  • Original page
  • New address

GeezerVison is showing python-graph-gallery.com — Table

Table

logo of a chart:TableBig

A table is a structured arrangement of data in rows and columns that allows for easy sorting, filtering, and analysis.

It can be used in data visualization to present information in a clear, organized manner for quick comparison and interpretation.

Several strategies exist to build table with Python. Tweaking matplotlib functions is doable but very verbose. pandas has a couple of utility functions. But plottable is definitely the best option. It is a powerful library and this section describes it ind depth.

Table sectionAbout this chart

Table with great_tables

great_tables is a python library for plotting nice table outputs inspired by the R packages gt.

The most simple table with great_tables

The most simple table with great_tables

Add a title to the table with great_tables

Add a title to the table with great_tables

Add footer with markdown to the table with great_tables

Add footer with markdown to the table with great_tables

Highlight a specific cell with great_tables

Highlight a specific cell with great_tables

Table with Plottable

Plottable is a python library for plotting nice table outputs. You can custom style, colors, add images and even more with a light python syntax!

Plottable is almost the single python library made especially for creating nice output tables. According to the main author, it's inspired from the R packages gt and reactable.

If you don't know this tool yet, I suggest starting with the introduction to plottable. It will teach you how to install the library and create a simple yet clean table with the Table() object.

Introduction to Plottable main features

Introduction to Plottable main features

The second chapter of the tutorial explains how to customize table colors. Learn how to highlight a cell, a row or a column, or even how to use a gradient color to transform a table in a heatmap.

Color of a specific row

Color of a specific row

Color of a specific column

Color of a specific column

Gradient color in a column

Gradient color in a column

Color rows based on if they are even or odd

Color rows based on if they are even or odd

Next, learn how to insert graphs in cells: barplot, donuts, stars and more. This can greatly improve the readability of your table, making it much more insightful.

Star review in a column

Star review in a column

Percentile bar in a column

Percentile bar in a column

Donut progress in a column

Donut progress in a column

Progress bar in a column

Progress bar in a column

Advanced custom graph with plottable

Advanced custom graph with plottable

Lastly, some additional tips like how to insert images in cells.

Add images in a column

Add images in a column

Matplotlib logo Table with Matplotlib

Matplotlib is probably the most famous and flexible python library for data visualization. It is pretty limited when it comes to building table though.

Here are a few examples where matplotlib is used to create a table.

Stacked Barplot combined with a table

Stacked Barplot combined with a table

Pandas logo Table with Pandas

Pandas has a whole section dedicated to formatting table in its doc. It lists any features but I still advise to use plottable as documented above.

Table with gradient color used to represent a numeric value

Table with gradient color used to represent a numeric value

Table with gradient color used to represent a numeric value

Table with gradient color used to represent a numeric value

Best python table examples

The web is full of astonishing charts made by awesome bloggers, (often using R). The Python graph gallery tries to display (or translate from R) some of the best creations and explain how their source code works. If you want to display your work here, please drop me a word or even better, submit a Pull Request!

The 10 best and worst countries to live in according to the EIU, presented in a beautiful table.

The 10 best and worst countries to live in according to the EIU, presented in a beautiful table.

Related chart types

logo of a chart:Bar

Barplot

logo of a chart:Spider

Spider / Radar

logo of a chart:Wordcloud

Wordcloud

logo of a chart:Parallel1

Parallel

logo of a chart:Lollipop

Lollipop

logo of a chart:CircularBarplot

Circular Barplot

logo of a chart:TableBig

Table

300 projects

💡 Out of dataviz inspiration?

I have spent years collecting the most beautiful data visualizations out there. Get the list of my top 300 dataviz projects, hand-picked, for free.

I respect your privacy. Unsubscribe anytime.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.