Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Python Script in Power BI

It's great that Power BI already has the capability to run R scripts for data transformation. It would be even better if we could run Python script.
Status: Completed
Comments
larry_clark
New Member
Re: Amanda's note of 8/7/18: Awesome! That'll be a breakthrough in the flexibility of this already wonderful tool!
pbiideas1
New Member
'@Anonymous, I suspected that since the July feature summary was released July 23 and there's been a lot of talk about a 'Py' indicator being available as a visualization option under the Microsoft Business Applications Summit 2018 presentations. But if you use the download link from the July 2018 feature Summary, Python support will be available: https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-july-2018-feature-summary/ Or at least it was when I ran an update this morning.
thombeaux
New Member
I am getting an error no module named 'pandas'
barry_martin1
New Member
Yes!!!!
Moh_ali_square
Advocate II
That’s great
gerquinn1978
New Member
Fantastic, will it be in the next version of the Power BI on-Prem Server?
Christann
Advocate IV
The preview worked great for me! One thing that would make it easier to use would be to enable the drop-down ability like in a python editor i.e. when I type "pandas." I get a drop-down list of the pandas functions. Thank you so much for creating this capability!
pbiideas1
New Member
'@Peter, The documentation still seems a bit sparse. You'll need pandas and matplotlib to make Py visualizations. If you're running Anaconda you should be fine. There seems to be an issue with locale settings if you're based in a country where comma as decimal separator is the norm. So if you install Anaconda and check your locale settings, you should be able to make the same chart that is shown in the Power BI desktop august feature summary. Python visuals are currently supported only in Power BI Desktop. I tried putblishing to Power BI on the web, but I only got that exact error message with a link directing me to a page about R visualizations. So as I said, the documentation seems a bit sparse. Check out these resources: Anaconda: https://www.anaconda.com/download/ Some issues to be aware of: https://stackoverflow.com/questions/51859000/regional-settings-conflicting-with-matplotlib-for-python-visualizations-in-power Link in the error message from Power BI services: https://docs.microsoft.com/en-us/power-bi/desktop-r-visuals
petermcnally
Advocate IV
Is there any documentation on this? Like a list of packages supported? Do the visuals work in the service?
david_emmanuel_
New Member
It would be great if we could access all tables in our data model to create custom measures in Python. At this point it seems that you can ETL one table at a time in the import phase, and create visuals in the visual element. If we can write python functions to act as DAX functions I think this will be very useful.