Datapane python reporting library for interactive reports and beautiful charts

Datapane is a Python reporting library. By using datapane with the combination of pandas dataframe, you can build very attractive reports and charts. Datapane was first released on Nov 12, 2019. Using Datapane you can build interactive reports for your end-users in less time.

Few other reporting libraries in python to generate reports in the different use cases.

  1. Datapane basic information.
  2. How to install Datapane?
  3. Example: Datapane tabular report example.
  4. Example: Datapane to generate an interactive and beautiful line chart.

1. Datapane basic information

About Datapane is a Python library. It was first released on Nov 12, 2019. Using Datapane you can build interactive reports for your end-users in less time.
install pip install datapane
import import datapane as dp
Url https://docs.datapane.com/
PyPI Releases https://pypi.org/project/datapane/
Is Open Source YES, not open-contribution
Source Code https://github.com/datapane/datapane
Latest Version Version 0.14.0

Jump to the top of the page↵

2. How to install Datapane?

First, ensure pip is installed on the system, if pip is not installed then there are 2 ways to get it installed on the system

Once pip is set up on the system than by using pip install the Datapane library.

pip3 install -U datapane

Installing Datapane by using Conda: Use below command to install the datapane using conda

conda install -c conda-forge “datapane>=0.14.0”

Jump to the top of the page↵

3. Example : Datapane tabular report example.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 07:49:49 2022
website : http://mycloudplace.com
@author: Prem Shanker Verma
"""
import pandas as pd
import altair as alt
import datapane as dp
if __name__ == "__main__":
    Movies = [
        {'Movie':'Baahubali 2 The Conclusion', 'Budget':'250', 'Verdict':'All Time Blockbuster'},
        {'Movie':'KGF Chapter 2', 'Budget':'100', 'Verdict':'All Time Blockbuster'},
        {'Movie':'Dangal', 'Budget':'70', 'Verdict':'All Time Blockbuster'},
        {'Movie':'Sanju', 'Budget':'100', 'Verdict':'All Time Blockbuster'},
        {'Movie':'PK', 'Budget':'85', 'Verdict':'All Time Blockbuster'},
        {'Movie':'Tiger Zinda Hai', 'Budget':'210 ', 'Verdict':' Blockbuster'},
        {'Movie':'Bajrangi Bhaijaan', 'Budget':' 90 ', 'Verdict':'All Time Blockbuster'},
        {'Movie':'War', 'Budget':'150', 'Verdict':'Blockbuster'},
        {'Movie':'Padmaavat ', 'Budget':'215', 'Verdict':' Blockbuster'},
        {'Movie':'Sultan', 'Budget':'80', 'Verdict':' Blockbuster'},
        {'Movie':'Kabir Singh', 'Budget':'55', 'Verdict':' All Time Blockbuster'},
        {'Movie':'Tanhaji: The Unsung Warrior', 'Budget':'150', 'Verdict':' Blockbuster'},
        {'Movie':'Dhoom 3', 'Budget':' 175 ', 'Verdict':'All Time Blockbuster '},
        {'Movie':'The Kashmir Files', 'Budget':' 20', 'Verdict':'All Time Blockbuster'},
        {'Movie':'URI The Surgical Strike', 'Budget':'70 ', 'Verdict':'All Time Blockbuster'}
        ]
    
    df = pd.DataFrame(Movies)
    
    report = dp.Report(dp.Table(df))
    report.save(path="MoviesTabular.html")

 OUTPUT:

Jump to the top of the page↵

4. Example: Datapane to generate an interactive and beautiful line chart.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 07:49:49 2022
website : http://mycloudplace.com
@author: Prem Shanker Verma
"""

import pandas as pd
import altair as alt
import datapane as dp

if __name__ == "__main__":
    Movies = [
        {'Movie':'Baahubali 2 The Conclusion', 'Budget':'250', 'Verdict':'All Time Blockbuster'},
        {'Movie':'KGF Chapter 2', 'Budget':'100', 'Verdict':'All Time Blockbuster'},
        {'Movie':'Dangal', 'Budget':'70', 'Verdict':'All Time Blockbuster'},
        {'Movie':'Sanju', 'Budget':'100', 'Verdict':'All Time Blockbuster'},
        {'Movie':'PK', 'Budget':'85', 'Verdict':'All Time Blockbuster'},
        {'Movie':'Tiger Zinda Hai', 'Budget':'210 ', 'Verdict':' Blockbuster'},
        {'Movie':'Bajrangi Bhaijaan', 'Budget':' 90 ', 'Verdict':'All Time Blockbuster'},
        {'Movie':'War', 'Budget':'150', 'Verdict':'Blockbuster'},
        {'Movie':'Padmaavat ', 'Budget':'215', 'Verdict':' Blockbuster'},
        {'Movie':'Sultan', 'Budget':'80', 'Verdict':' Blockbuster'},
        {'Movie':'Kabir Singh', 'Budget':'55', 'Verdict':' All Time Blockbuster'},
        {'Movie':'Tanhaji: The Unsung Warrior', 'Budget':'150', 'Verdict':' Blockbuster'},
        {'Movie':'Dhoom 3', 'Budget':' 175 ', 'Verdict':'All Time Blockbuster '},
        {'Movie':'The Kashmir Files', 'Budget':' 20', 'Verdict':'All Time Blockbuster'},
        {'Movie':'URI The Surgical Strike', 'Budget':'70 ', 'Verdict':'All Time Blockbuster'}
        ]
    
    df = pd.DataFrame(Movies)
    
    plot = (
    alt.Chart(df).mark_line(color='blue',opacity=0.9)
    .encode(
        x="Movie",
        y=alt.Y("Budget"),

    )
    .interactive()
    )
    
    report = dp.Report(
    dp.Plot(plot, caption="List of popular movies with verdicts")
    )

    report.save("MoviesChart.html")

OUTPUT:

Jump to the top of the page↵

Below are my previous articles

11 thoughts on “Datapane python reporting library for interactive reports and beautiful charts”

  1. Pingback: Python reporting libraries | Python reporting tools to generate interactive and beautiful reports - Mycloudplace

  2. you made some decent points there. I looked on the internet to learn more
    about the issue and found most individuals will go along with your views on this web site.

  3. Pingback: Python obfuscation | Great technique to hide python code | Perfect use of pyarmor - Mycloudplace

Leave a Comment

Your email address will not be published. Required fields are marked *