API Reference

Formatting values

Turn single values into display strings.

fmt_number()

Format a number with a fixed number of decimal places and a thousands separator.

fmt_percent()

Format a proportion as a percentage.

fmt_currency()

Format a number as a currency value.

Tables

Build a table, format its columns, and render it as text or HTML.

Table

A small, column-oriented table.

Table.fmt()

Attach a formatting function to a column.

Table.as_text()

Render the table as a Markdown-style text table.

Table.as_html()

Render the table as an HTML <table>.

Table.to_csv()

Write the table’s unformatted values to a CSV file.

Table.from_csv()

Read a table from a CSV file. All values are read as strings.

Summary statistics

Summarize a set of numbers.

summarize()

Compute summary statistics for a sequence of numbers.

SummaryResult

Summary statistics for a set of numbers, as returned by summarize().