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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
hamadani
Frequent Visitor

Create new table using Python script in Power BI

Hi,

 

I have a table in Power BI which I would like to do some aggregation and data transformation on it using pandas and save the output as a new table in Power BI. Is there anyway to do this in Power BI?

 

Thanks

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

No.  The python visual is supposed to plot something, it will not return anything back except that plot.

View solution in original post

4 REPLIES 4
pcross42
New Member

Very new to Power BI and Jupyter but came across what looks like a way to create a table (with data) using Python and get it into Power BI. Curious if this would work because using Python to manipulate Power BI seems like a good combination.

https://blog.enterprisedna.co/power-bi-with-python-scripting-to-create-date-tables

After creating a table in Jupyter
Go back to Power BI:
Click Get Data and select Text/CSV
click Transform Data in the Home tab
go to the Transform tab and click Run Python Script
Go back to your Jupyter Notebook and copy the syntax from the cell. Then, paste it into the script editor.

 

lbendlin
Super User
Super User

No.  The python visual is supposed to plot something, it will not return anything back except that plot.

Thank you @lbendlin , Is there any way to apply python functions to table data in Power BI and get a dataframe back in return?

Only in Power Query. Not in the UI part.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.