The Jupyter notebook makes creating and sharing Power BI reports simple. With Jupyter notebook you can embed or create reports quickly.
The powerbiclient Python package lets you embed Power BI reports in Jupyter notebooks easily. You can export data from visuals in a Power BI report to the Jupyter notebook for in-depth data exploration. You can also filter the report for quick analysis or use bookmarks to apply a saved view.
Install the Power BI Client package
The powerbiclient package can be found on PyPI. It's also open sourced on GitHub.
For detailed usage information, see the GitHub wiki.
Embed a report
This example shows how to embed a Power BI report using the package.
Import Report class and models from the package:
Python
from powerbiclient import Report, models
Authenticate against Power BI using Azure AD:
Python
# Import the DeviceCodeLoginAuthentication class to authenticate against Power BIfrom powerbiclient.authentication import DeviceCodeLoginAuthentication
# Initiate device authentication
device_auth = DeviceCodeLoginAuthentication()
Set the workspace ID and report ID you’d like to embed:
Python
group_id="Workspace ID"
report_id="Report ID"
Create an instance of Power BI report and load the report to the output cell:
The GitHub repository includes a demo Jupyter notebook that embeds a user's report. It demonstrates the complete flow of embedding and interacting with Power BI report, including:
Report event handlers
Get list of pages
Get list of visuals
Export and visualize visual data
Apply filters
To run the demo:
Make sure you have the following prerequisites:
pandas
matplotlib
Run the following commands:
Python
cd demo
jupyter notebook
Run demo.ipynb.
Quick create a report
You can also easily generate a Power BI quick report from your data in just a few steps. Use any DataFrame in your notebook to quickly transform it into insightful visualizations'. Save the report, if you want, and use it as you would any other report.
Tämän avulla Power BI voit luoda havainnollistamisen ja raporttien havainnollistamisen. Tässä moduulissa opetellaan Power BI Desktop , kuinka tietoja yhdistetään tietoihin, luodaan visuaalisia tietoja ja luodaan raportti, jonka voit jakaa organisaation muiden kanssa. Sen jälkeen opetellaan raportin julkaisemista Power BI palvelussa, jotta muut näkevät käsityksen työstäsi ja hyötyvät siitä.
Esittele menetelmiä ja parhaita käytäntöjä, jotka ovat yhdenmukaisia microsoft Power BI:n kanssa liiketoiminnan ja teknisten vaatimusten kanssa mallinnusta, visualisointia ja analysointia varten.