Introduction to Datapane: A Python Library to Build Interactive Reports
Simple Framework to Create Beautiful Reports and Share your Analysis Results with your Team
Motivation
For many Python data analyses, sometimes you want to share your findings with others. Showing your work will help your team and manager keep up-to-date with your progress and build your reputation as a data scientist in your network. I mentioned about how sharing my work has leveraged my career in this article:
But sharing alone is not enough. Let’s say after cleaning your data and creating some charts for analyzing, you want to share with others your findings. The last thing you want to do is to share with non-technical people (such as your stakeholders) the whole code or notebook and ask them to install Jupyter Notebook and environments required to see your findings like the below:
“This is the .ipynb file. To view this file, you need to pip installthese packages. Then type on the command line Jupyter Notebook. Once you see the notebook, run all the cells and you should be able to see the data and visualization”.
As an alternative, you could take the picture of the visualization and put it in a deck, but viewers will not have much control over the visualization — they wouldn’t be able to use it interactively, explore any data, or change the input parameters. Additionally, every time they want a change, you’ll have to create another report manually.
The optimal strategy is to share a specific user-facing part without setting up the environments. Wouldn’t it be great if you can send them a link like this to your teammates or stakeholders

to view all of your findings in one place?

That is when you need a Python framework like Datapane.
What is Datapane?
Datapane is an API for people who analyze data in Python and need a way to share their results. It provides a way to create reports programmatically from components that wrap around the common objects in analyses, such as:
- Pandas DataFrames
- Plots from Python visualization libraries such as Plotly, Bokeh, Altair, and Folium
- Markdown
Once created, reports can be published on the web, dynamically generated in the cloud, or embedded into your own application, where data can be explored, and visualizations can be used interactively
Datapane also allows you to deploy your Python scripts and notebooks, so that other people can run them to generate reports from their browser without worrying about code, notebooks, or setting up a Python environment.
Let’s Try it Out!
Let’s say you have a script like this with Pandas Dataframe and Altair chart







