This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
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.
Python_visualizations_in_Power_BI_Service
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_visualizations_in_Power_BI_Service
The following Python packages (non-Intel MKL) are currently supported for use in your Power BI reports:
The Power BI service also imposes other limits on Python script execution.
| Constraint | Limit |
|---|---|
| Dataframe size | 150,000 rows 250MB when serialized in CSV format |
| Execution time | 60 seconds |
| Memory consumption | 1 GB |
| Disk I/O | 1 GB/sec |
| Image size for a visual in PNG format | 2 MB |
These constraints apply to the execution of Python scripts in Power BI service. Python script execution on the Power BI Desktop and personal gateway has the same dataframe size and PNG image size limits, but the execution time limit is 300 seconds. Other constraints are not applicable to Power BI Desktop and personal gateway.
When you publish a Power BI report with Python scripts to the service, these scripts will also be executed when your data is refreshed through the on-premises data gateway in personal mode (personal gateway).
To enable this, you must ensure that the Python runtime with the dependent Python packages are also installed on the machine hosting your personal gateway. Note, Python script execution is not supported for on-premises data gateways shared by multiple users.
If you have any questions, you can post them on the community forums, or you can reach me at @santoshc1. We'd love to hear your feedback and ideas. Hope you enjoy scripting with Python in Power BI!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.