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
Anonymous
Not applicable

Use python to transform data

Hi Guys,

I have a table and I need to do some tranformation using python script.
I know that it is possible to use python script on Power BI.

Rick_ferreira_0-1625061338427.png

How can I do a table tranformation using python script?

Thanks

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

About using Python to do transformations in power query, you can refer these documents and articles that could help you:

  1. Basics of Power BI Transformations with Python 
  2. Use Python in Power Query Editor 
  3. power-bi-how-to-use-python-with-multiple-tables-in-the-power-query-editor 
  4. Transform Data in Power BI with R and Python 

 

Best Regards,
Community Support Team _ Yingjie Li
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
IvanSinelnyk
New Member

Hi everyone.  Need help. I have column with number of seconds (number type) and I need that big numbers (~32 000 000) transform to days, hours ... I allredy made it with DAX. But can't use this result to see averege time. I think python should help. 

v-yingjl
Community Support
Community Support

Hi @Anonymous ,

About using Python to do transformations in power query, you can refer these documents and articles that could help you:

  1. Basics of Power BI Transformations with Python 
  2. Use Python in Power Query Editor 
  3. power-bi-how-to-use-python-with-multiple-tables-in-the-power-query-editor 
  4. Transform Data in Power BI with R and Python 

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

mahoneypat
Microsoft Employee
Microsoft Employee

What transformation are you trying to do?  Are you sure Python needed?  Here is a video on getting started with Python if you really need it.

(9) Intro to Python in Power BI - YouTube

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on 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.