Skip to content

Table numeric alignment and consistent precision

badtablesmechanicalTufte 2001 p. 178Wilke 2019 p. 274Few 2012 p. 28Few 2012 p. 172Few 2012 p. 177Jenkinson 1949 p. 82Miller 2013 p. 19Miller 2013 p. 105Miller 2013 p. 241

How do median bills compare by day?

Plotly Express Tips dataset.

“Arrange the type to facilitate comparisons”

Edward Tufte, "The Visual Display of Quantitative Information", second edition, p. 178.

Also covered in Wilke 2019 (22 Titles, Captions, and Tables, p. 274), Few 2012 (2 SIMPLE STATISTICS TO GET YOU STARTED, p. 28), Few 2012 (8 TABLE DESIGN, p. 172), Few 2012 (8 TABLE DESIGN, p. 177), Jenkinson 1949 (6 The Footnote, p. 82), Miller 2013 (2 Seven Basic Principles, p. 19), Miller 2013 (5 Creating Effective Tables, p. 105), Miller 2013 (11 Choosing How to Present Statistical Test Results, p. 241).

CVD preview

Before

The numeric cells align at the left and omit trailing zeros.

Download before Python code

After

The numeric column and its header align at the right with two decimal places so cents line up. Sunday has the highest median.

Download after Python code

Values

Median bills were 16.20 dollars on Thursday, 15.38 on Friday, 18.24 on Saturday and 19.63 on Sunday.

Values used in both tables
DayMedian bill (USD)
Thur16.2
Fri15.38
Sat18.24
Sun19.63