Forum Discussion
Use Plotly with Python Script in Power BI
- 7 years ago
Hi Anonymous ,
I'm afraid that Plotly is not supported in Power BI currenly.
Based on the blog, only the following Python packages (non-Intel MKL) are currently supported for use in your Power BI reports.
- matplotlib
- numpy
- pandas
- scikit-learn
- scipy
- seaborn
- statsmodels
In addition, you could refer to this similar thread which should make sense.
Best Regards,
Cherry
I am able now to make a plotly graph inside Power BI using python.
However, Power BI shows my graph in a new window of my browser (instead of showing into the Power BI framework).
The last line of my code is
fig.show()How could I print it into the Power BI framework?
- HamidBee4 years agoPower Participant
I believe that this was always the case and that Plotly is still not integrated in Power BI via Python. Meaning, it still won't show graphs in Power BI. I still can't understand why Plotly works with R and not Python. To the Power BI team at Microsoft, please fix this.
- Anonymous4 years agoNot applicable
use fig.write_image('test.png'). but it's a static image, can't be interactive.
- HamidBee4 years agoPower Participant
I am using this example sample code:
import plotly.express as pxdata_canada = px.data.gapminder().query("country == 'Canada'")fig = px.bar(data_canada, x='year', y='pop')fig.write_image('test.png')however it doesn't seem to work. When I use fig.show() it will show the chart but in a web browser.