Skip to main content

Formatting DataFrames

Charts are a great way to visualize data. However, sometimes the plain tabular view of data is all that is required. To reduce the burden of having to go through lots of data, it is possible to bring attention to specific data with suitable formatting. SQL Frames provides several formatting options.

  1. Data Formatters These allow formatting the data, for example showing a number value as an amount along with a currency symbol.

  2. Data Stylers These allow adding styles to the rendered table rows, header columns and data cells. Any valid CSS can be used to provide the custom styling.

  3. Data Renderers These allow not just styling or formatting but completely altering what is rendered. For example, a rating field can be rendered a scale of stars instead of as a numeric value.

  4. DataFrame Summaries These allow decorating the DataFrames with summary information.

fmt is the formatting plugin instance accessible from a DataFrame instance as df.fmt.