Filter Bar

The filter bar has controls to:

  1. Add a filter, show/hide existing filters, or clear filters
  2. A button to quickly add a new filter
  3. Convert currently applied filters to reusable code
  4. The status bar at the bottom of the Data Explorer also displays the percentage and number of remaining rows relative to the original total after applying a filter

Data explorer with active filters: 'year = 2013' and 'month >= 2.' Displays 309,772 rows of data across 19 columns. Options visible include 'Add Filter,' 'Hide Filters,' and 'Clear Filters.' A summary below indicates a large data set.

Overview of Filter Bar UI

Filtering

When creating a new filter, you will first need to select a column either by scrolling the full list or searching across columns for a specific string. Once a column is selected, the available filters for that column type will be displayed. Alternatively, the context menu in each column label of the data grid also allows for creating filters with the column name pre-populated.

Available filters vary according to the column type. For example, string columns have filter affordances for: contains, starts or ends with, is empty, or exact matches. Alternatively, numeric columns have logical operations such as: is less than or greater than, is equal to, or is inclusively between two values.

There is also sorting capabilities, covered in the Data Grid.

Convert to code

The Data Explorer includes a Convert to Code button in the top action bar. This button writes Python or R code that reproduces your current data view, including any filters or sorts you’ve applied during exploration. This allows you to quickly capture your interactive exploration as reproducible code. To convert your Data Explorer view to code:

  1. Apply any filters, sorts, or other transformations in the Data Explorer
  2. Click the Convert to Code button in the top action bar
  3. Preview the code in the modal
  4. Click Copy to Clipboard to copy the code for pasting into the console, a script, or any other location

The code references the dataframe object already loaded in your session rather than reading data from disk. The Convert to Code button writes code appropriate for your dataframe type:

  • pandas dataframes produce pandas code
  • polars dataframes produce polars code, with the option to convert to pandas code
  • R dataframes and tibbles produce dplyr code with pipe syntax
  • Files opened directly (.csv, .tsv, .parquet) produce DuckDB SQL code