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 September 15. Request your voucher.

Reply
Anonymous
Not applicable

How can I run a python script to an established power query transformation?

I need to apply a Regex transformation to a column, I have python and pip installed.

 

Is there anyway to do this using pandas?

 

Thanks !

 

 

3 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

yes.  What have you tried and where are you stuck?  Are you sure you need regex?

 

Using regular expressions in power bi desktop - Microsoft Power BI Community

View solution in original post

Anonymous
Not applicable

Python_Script.PNG

 

 

 

 

 

 

 

 

 

 

 

 

I'm more or less learning how to apply pandas functions and apply this particular regex expression. But this is my current step.

 

 

View solution in original post

lbendlin
Super User
Super User

that error is unrelated to regex.  Specify a column type before loading the data into the puthon dataframe.

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

that error is unrelated to regex.  Specify a column type before loading the data into the puthon dataframe.

lbendlin
Super User
Super User

yes.  What have you tried and where are you stuck?  Are you sure you need regex?

 

Using regular expressions in power bi desktop - Microsoft Power BI Community

Anonymous
Not applicable

Python_Script.PNG

 

 

 

 

 

 

 

 

 

 

 

 

I'm more or less learning how to apply pandas functions and apply this particular regex expression. But this is my current step.

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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