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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Run Python script from Power Query Editor

Hello all,

I am trying to insert a descriptive statiscis table into my report. I come from the Python world, easier way from me is to run dataframe.describe().

After reading and make some research, it was suggested to run python script from Power Query Editor, ...I follow the instructions, but I don't see what it suppoused to be the descriptive statistics report ..it generates a empty Table. Can someone help with this ?

 

Thanks.

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

I can get correct result with df= df.describe(). Have you already installed the matplotlib and pandas packages?

 

You can refer to the video: https://www.youtube.com/watch?v=FhpJLLfrx4c 

 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , One of the ways I can think of is to try to load data using python connector and before you return dataset do some operations which you want and return the final dataset

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks for your quick response,  I tried that, getting data as follows  : df=pd.read_csv('file.csv') 

                                                                         df= df.describe()

It's passing just the df with numbers (one column) no the whole descriptive statistics as it suppoused to.

 

Hi @Anonymous ,

 

I can get correct result with df= df.describe(). Have you already installed the matplotlib and pandas packages?

 

You can refer to the video: https://www.youtube.com/watch?v=FhpJLLfrx4c 

 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

Anonymous
Not applicable

That video solved my issue!!! Thanks!!!!! @v-kkf-msft 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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