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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Python Visual in Power BI Slow?

With the August 2018 release came the awesome inclusion of Python in Power BI, but has anyone experienced any slowness when running the visual? I installed Python 3.7 today as well as pandas and matplotlib. When trying to run the below code on a dataset of 2 rows, it takes roughly 45 seconds and then displays correctly.

 

import matplotlib.pyplot as plt

x = dataset.values[:,0]
y = dataset.values[:,1]

plt.bar(x,y)
plt.show()

Does anyone have an idea why this might be happening or have any similar experiences?

 

Thanks,

Parker

1 ACCEPTED SOLUTION

Hi Parker,

 

I tried the Python 3.7. It showed the diagram in a few seconds. I think the issue could be caused by something else. You can test it in Python to see how fast it could be.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Thank you both for the replies. The quick specs of my machine are 2.40 GHz (2 processors), 12 GB RAM, 64-Bit. Not virtual, no graphics card.

 

Also, the data I am using was created by going to Enter Data and then adding the following data:

 

Column1   Column2

1               3

2               4

 

So there are only 2 rows of data. Good to know that it is quick on your side. Maybe it's just this computer and I will try on my personal. What versions of Python are you running? I chose to run 3.7 (not sure if that matters).

 

Thanks,

Parker

Hi Parker,

 

I tried the Python 3.7. It showed the diagram in a few seconds. I think the issue could be caused by something else. You can test it in Python to see how fast it could be.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks for the suggestion, Dale. It definitely seems to be a problem with Python on my machine. In the Python shell, it still takes a good while to run that code. Thank you for the reponses.

 

-Parker

v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi Parker,

 

Can you share a dummy one of your data? It's 2 or 3 seconds in my test. 

 

 

Best Regards,

Dale

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
srinivt
Microsoft Employee
Microsoft Employee

If you rerun the visual script, does it still take 45s?

Anonymous
Not applicable

Yep, every time 😕

That is odd. Thanks...can you share the specs of your environment? (Hardware specs, VM or not, graphics etc)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.