Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
do I need connect data via Python Script to be able to use them for visualisation by python?
All manuals I have seen are using data connected by python only.
I have complex report with several kind of data source. Do I need to connect all sources via python which I want to use for python script visualization?
If not, how I can in python script for visualisation use data which has been connected in standard way (using top ribbon menu)?
You don't necessarily need to connect your data sources via Python in order to use them for visualization with Python in Power BI. Power BI supports a wide range of data sources that can be connected and used for visualization without needing to use Python to access the data.
If you have already connected your data sources in Power BI, you can use them directly in Python visualizations by using the pandas library in Python. The pandas library provides a way to read data from various sources, including CSV files, Excel files, SQL databases, and more.
Here's an example of how you can use pandas to read data from a CSV file and use it for visualization in a Python visualization in Power BI:
In this example, we're using pandas to read data from a CSV file named "data.csv". We then create a bar chart using the seaborn library and matplotlib library, and display it using plt.show().
You can use this approach to read data from any data source that pandas supports and use it for visualization in a Python visualization in Power BI. Keep in mind that if you have multiple data sources with different structures or schemas, you may need to do some data manipulation or transformation before you can use them together in a Python visualization.
Best regards,
Isaac Chavarria
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
As I understand we need to import data from Python to Power BI and Then Create the Visualisation using Python script.
You can see a demo in this video: https://www.youtube.com/watch?v=k4GJu9Enb1g&list=PLApPcvU5-R24K3mbxORV7T3ckVLfDjmHF&index=17
Hi , @Anonymous
The Python script can get the data from the code return and in my research , it can also create Power BI visuals with Python.For more information, you can refer to :
Create Power BI visuals using Python in Power BI Desktop - Power BI | Microsoft Learn
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@v-yueyunzh-msftyou didn't answered on my question and an article on link doesn't describe data connected in standard way.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 44 | |
| 42 | |
| 33 | |
| 30 | |
| 27 |
| User | Count |
|---|---|
| 134 | |
| 114 | |
| 58 | |
| 57 | |
| 57 |