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.
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.
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.
To create a dp.DataTable, import the datapane library:
Next, take any DataFrame:
and wrap it in Datapane's dp.DataTable block:
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.