Turn DataFrames into interactive, sortable, and searchable tables

Datapane's DataTable block renders an interactive, sortable, searchable table from any pandas DataFrame.
Written by
Datapane Team
Published on
17 January 2022

DataFrames are an essential data structure for data scientists and the most popular format for exploring data in Python.

But presenting DataFrames to others can be lacklustre.

A static view of a few rows in a notebook isn’t a great way for anybody to view or interact with valuable analysis.

Introducing Interactive DataTables

Our dp.DataTable function renders an interactive, sortable, searchable table from a pd.DataFrame.

Lacklustre data is immediately transformed into something interactive that end-users can filter, export, and run SQL queries against.

In short, they can easily extract values and subsets of data without writing Python.

Why it's useful

dp.DataTable is a powerful tool for Jupyter users. 

It allows them to display and share data with non-technical viewers, who can explore it independently in a controlled environment.

The SQL functionality is almost a secret weapon. 

It's quick, it doesn't require re-execution of a (potentially long) pipeline, a (correct) development environment, or an understanding of the underlying data structure and Pandas.

Building a DataTable

To create a dp.DataTable, import the datapane library:

import datapane as dp

Next, take any DataFrame:

A Jupyter Notebook with a static DataFrame

and wrap it in Datapane's dp.DataTable block:

dp.DataTable(df)
A Jupyter Notebook with an interactive DataTable

Our DataFrame is now interactive. We can explore it with filters, sorting, export options, and even run SQL queries against the data.

You can automatically turn it into a data app using our automatic Jupyter conversion to save locally or upload to cloud.