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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
JuliMed
Frequent Visitor

How to read Data From Power BI Dataset to Python

Is there any way to connect to a Power BI dataset and export this data to a Pandas DF? I've been looking for this online but found nothing except using adodbapi which is failing to install on our side due to the 'build_py_2to3' package and we have not been able to overpass this.

 

This is the video we found 

 

We are trying to get this data from a PowerBI dataset as the data comes from different Power BI Dataflows where all transformations are occurring and it is not stored in any DB unfortunately.

Any hint will be much appreciated.

Thank you in advanced!

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @JuliMed ,

 

For now, there is no efficient way to export data directly from powerbi to panda df.

My suggestion is that you can export the data as a csv file in powerbi first, and then import the following two packages by command.

import pandas as pd
import datetime as dt

 

Then refer to the detailed documentation below to further import the data you need.

How to import data into Pandas dataframes


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

3 REPLIES 3
alexrm
New Member

Hello, this comes maybe too late, but for others who might need such a tool, I created a very simple utility to read table from a locally-opened PowerBI report. Support for cloud-stored reports is planned. You can found it at https://pypi.org/project/pbi-local-connector/. Don't hesitate to share feedback about it.

v-henryk-mstf
Community Support
Community Support

Hi @JuliMed ,

 

For now, there is no efficient way to export data directly from powerbi to panda df.

My suggestion is that you can export the data as a csv file in powerbi first, and then import the following two packages by command.

import pandas as pd
import datetime as dt

 

Then refer to the detailed documentation below to further import the data you need.

How to import data into Pandas dataframes


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

amitchandak
Super User
Super User

@JuliMed , XMLA Endpoint, Cmdlets, and REST APIs are three options, that can help you

https://docs.microsoft.com/en-us/power-bi/enterprise/service-premium-connect-tools

https://docs.microsoft.com/en-us/rest/api/power-bi/

https://docs.microsoft.com/en-us/powershell/power-bi/overview?view=powerbi-ps

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.