Table Display cells
Table Display cells are a unique cell type that make it easier to view, format, and filter tabular data.
Use the Data source dropdown to select the dataframe to display.
All of the features discussed here also apply to SQL cells in Display mode.
View options
There are a few options for how to configure the view of the Display Table:
- Rows per page: number of rows to display per page (you can see number of pages at bottom)
- Show index column: whether to show or hide the index
- Show datatype icons: whether to display an icon indicating each column's datatype
In Table Display cells, only the rows of the current page are loaded into memory. Consider this when deciding how many rows per page to display, as changing the page requires the cell to rerun in order to select new rows for viewing.
Column options
There are several column-level configuration options. Changes made to formatting and column names are not persisted to the underlying dataframe, so will not be passed through to any downstream references of the dataframe.
- Rename: change the column name to be displayed.
- Sort: Order rows by column values, ascending or descending
- Format: Change the value format of the column. Available formats:
- String columns
- Plain text
- URL
- Numeric columns
- Plain text
- Number
- Percent
- Currency
- Long currency
- Financial
- Decimal settings
- Date / time columns
- Plain text
- Date
- Long date
- Time
- Date & time
- String columns
- Wrap text: disable/enable text wrapping for a given column
Conditional formatting
You can apply conditional formatting rules to columns to call out specific data you'd like to highlight. Conditional formatting rules can be applied to one or multiple columns, and you can add as many rules as you'd like. Each rule can have several "variants", like options in a CASE
statement or if
.
Currently, conditional formatting allows for coloring cells either Green, Yellow, Orange, or Red.
Rule types
Each conditional formatting rule can be applied across all columns, all columns except certain columns, or only certain columns.
Different column types have different rules that can be applied:
- All data types: Is equal to, Is not equal to, Always
- Text: Text contains, Text does not contain
- Number: Greater than, Greater than or equal to, Less than, Less than or equal to
- Date: Day is, Day is before, Day is after
- Boolean: Is false, Is true
Filters
Table Display cells can filter data with a condition-based UI similar to a spreadsheet.
Filters can be applied to multiple columns at a time via the Filters menu, or to one column at a time using the column options menu. Columns with a filter applied will show a filter icon in the header in Logic View and the app builder, but this will not be displayed in published apps.
Users can also right-click on a table value in order to filter the column by that value.
The returned dataframe will only contain the filtered results.
Users of a published app can apply additional filters to Table Display cells by clicking on the column header, but cannot remove any filters that were applied when the app was published. Filters applied from a published app view do not affect the returned dataframe.
As of April 2023, any new SQL cells that use filters will accurately return the filtered dataframe. SQL cells that use filters, and were created prior to this date will continue to return unfiltered dataframes until action is taken by an Editor. Editors can click on the gear icon next to the returned dataframe in order and opt-in to returning the filtered dataframe.
Filter types
Each filter condition applies to an individual column. Multiple conditions can be applied to the same column.
Different column types have different rules that can be applied:
- All data types: Is equal to, Is not equal to, Always
- Text: Text contains, Text does not contain
- Number: Greater than, Greater than or equal to, Less than, Less than or equal to
- Date: Day is, Day is before, Day is after
- Boolean: Is false, Is true
Jinja support
Table Display filters also support using Jinja
Note that only Jinja variables (i.e. values inside {{ }}
brackets) are supported - Jinja expressions (with {% %}
) are not supported.
Exporting dataframes
You can use Table Display cells to export a dataframe as a csv (comma separated values) file. Use the Download button in the bottom right corner of any Table Display cell to download a csv of the underlying dataframe.
This functionality is available in both the Logic view and in published apps, so end users of apps can also download .csv's.
Conditional formatting and column formatting options will not be applied. The downloaded file will use the raw values from the underlying dataframe.