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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I am trying to upload csv, file in powerbi for python work but not able to import it.
Solved! Go to Solution.
Hi @Shweta_1585 ,
Based on the description, try to use the following code.
df = pandas.read_csv(r'path\to\your_file.csv')
What’s more, it is not recommended to use python scripts to import data if you are new to python.
You can just select the csv.
You can also view the following documents to learn more information.
Solved: PYTHON INTEGRATION WITH POWER BI - IMPORTING EXCEL... - Microsoft Fabric Community
Run Python scripts in Power BI Desktop - Power BI | Microsoft Learn
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Shweta_1585 ,
Based on the description, try to use the following code.
df = pandas.read_csv(r'path\to\your_file.csv')
What’s more, it is not recommended to use python scripts to import data if you are new to python.
You can just select the csv.
You can also view the following documents to learn more information.
Solved: PYTHON INTEGRATION WITH POWER BI - IMPORTING EXCEL... - Microsoft Fabric Community
Run Python scripts in Power BI Desktop - Power BI | Microsoft Learn
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much its helpful.
Hi, I am trying but not getting proper solution
This message showing while importing the file. Can you help me to understand this.
Hi @Shweta_1585 ,
Based on the description, you need to install python packages.
What’s more, only pandas data frames import, so make sure the data you want to import to Power BI is represented in a data frame.
Run Python scripts in Power BI Desktop - Power BI | Microsoft Learn
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Shweta_1585 ,
Can you clarify a bit more what you are trying to achieve? Do you want to create a csv using Python and import it to Power BI? Or are you trying to use the output of Power BI with Python?
Hi, Actually I am trying to import csv file in power bi using python scripting but i am new for phython so not able to import the file properly to complete assignment. I need to give proper dataset address here I am stuck how to do it.
Thanks.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 51 | |
| 46 | |
| 23 | |
| 19 |
| User | Count |
|---|---|
| 138 | |
| 111 | |
| 50 | |
| 33 | |
| 29 |