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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
h4tt3n
Helper V
Helper V

How to read imported data with Python script?

Hello folks,

 

I work professionally with Power BI and need a bit of help getting started using Python for data transformation. I already know how to run a python script inside Power BI.

 

What I have:

I've got a data table containing a UTC timestamp column.

 

What I want:

1. Read this column into a Python variable, probably a Pandas data structure.

2. Transform the timestamp from UTC to local user time using an IANA tz (I've already got the script for doing this).

3. Export or "print" the transformed data into the original table, deleting or overwriting the original values.

 

So, tldr: How do I read a table or column of imported data from power BI into a python variable, and how do I "print" or export the transformed data back into a PBI  table?

 

Cheers, and thanks in advance,

Mike

 

 

 

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @h4tt3n 

 

Are you trying to do it in Power Query? if so chect this documetaition 
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-in-query-editor

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

View solution in original post

1 REPLY 1
Mariusz
Community Champion
Community Champion

Hi @h4tt3n 

 

Are you trying to do it in Power Query? if so chect this documetaition 
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-in-query-editor

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.