Tired of running
df.head()on your dataframes? In this tutorial, we will explore the open-source visualizer for Pandas dataframes, D-Tale. Some of the features we'll touch on are installation, startup, navigating the grid, viewing column statistics, building a chart & code exports.
D-Tale is the combination of a Flask back-end and a React front-end to bring you an easy way to view & analyze Pandas data structures. It integrates seamlessly with ipython notebooks & python/ipython terminals. Currently this tool supports such Pandas objects as DataFrame, Series, MultiIndex, DatetimeIndex & RangeIndex.
# conda conda install dtale -c conda-forge # pip pip install -U dtaleSource code is available here.
import pandas as pd import dtale df = pd.DataFrame(dict(a=[1,1,2,2,3,3], b=[1,2,3,4,5,6])) dtale.show(df)You will be presented with one of the following:
PyCharm | jupyter |
---|---|
![]() |
![]() |
Once inside the grid you have all of the standard grid functionality at your fingertips by clicking column headers. If your still in the output cell of your jupyter notebook feel free to click the triangle in the upper lefthand corner to open the main menu and then click "Open in New Tab" to give you a larger workspace.
|
![]() |
If you open the main menu by clicking on the triangle in the upper lefthand corner you'll be presented with many options, one of which is "Build Columns". Click that and you see many options for different ways to build new columns based on your existing data. Here are some examples of a few of them:
Builder | Main Menu | Column Builder Menu | Output |
---|---|---|---|
Transform (Groupby Mean) |
![]() |
![]() |
![]() |
Mean Adjust (Subtract Columns) |
![]() |
![]() |
|
Winsorize |
![]() |
![]() |
Many times you'll want to be able to view a quick overview of the contents of your dataframe. One way to do this is by running
df.describe(). We've brought that function to life with the "Describe" menu option. By either opening the main menu or clicking a column header and then clicking the "Describe" button (clicking from a column header will preselect that column for you).
If you take a look you'll notice a listing of different statistics (which will vary based on data type of the column selected). These statistics are the output of calling
df.describe()on that column as well as some other helpful statistics like percentage of missings & kurtosis. You also have the ability to view other helpful information:
By opening the main menu once more and clicking the "Charts" button you will be brought to a new tab with the ability to build the following charts using Plotly Dash:
Let's take a look at the output of clicking the "Code Export" link of you chart that we built in Step 6.
Now the goal of code export is to help users learn a little bit about what code was run to get them what their looking at, but it is by no means gospel. So feel free to submit suggestions or bugs on the Issues page page of the repo.
Thank you for reading this tutorial and I hope it helps you with your data exploration. There's many other features that I haven't touched on here so I urge you to check it out the README, particularly the different UI functions. If you liked this please support open-source and star the repo. :)