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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.