bi & analytics

Power BI service

January 2019

Read Time: 7 minutes

Courtesy of Blog: https://powerbi.microsoft.com/en-us/blog/python-visualizations-in-power-bi-service/

With our February update of Power BI, you can now share, publish and view Python visuals in your reports and dashboards. This update extends the support for Python in the Power BI Desktop to the Power BI service. This ability completes the support for Python in Power BI, enabling you to use Python scripts to prepare your dataset, apply sophisticated analytics or machine learning in the Power BI Desktop & personal gateway, and then plot the results in your Power BI reports using any of the hundreds of open-source Python visualization packages. Publishing your reports to the Power BI service will automatically refresh these visuals with the latest data when a user views the report.

Just like the support for R visualizations in Power BI, your Python visualizations will update with cross-filtering in the report, but the visuals are not interactive. Publishing Power BI reports with Python visuals You can add a Python visual to your Power BI report by selecting the Python visual icon from the Visualizations pane in the Power BI Desktop, which adds a placeholder Python script to the report. Adding the fields from your dataset to the Values pane of the Python visual, automatically adds the fields to the pandas DataFrame in the placeholder Python script. You can then use the Python script to create the visualization you’d like. See Create Power BI visuals using Python for instructions.

When you publish the report the report to your Power BI workspace, the visuals are automatically refreshed when the report is viewed. Note, there are a few constraints on the size of the serialized Python dataframe, and the execution resources used by the Python scripts, that are summarized below.

Python packages and versions The initial version of the Python runtime supported in Power BI includes versions 2.7.15 and 3.7.1. We will periodically update the runtime to keep it current.

Author:Mr. Kamlesh jha
`