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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

Power bi: Power Query call two datasets on a Python Script

Hi, I have 2 datasets "Evolution" and "Status" and I have a python script that makes some transformations using both of them. When I go to the Evolution data and Run Python script, by default the it is called dataset. What will be the name of Status if I want to call it in the same python script? or, What should I use to call both them in the same script?

python.jpg

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,


Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your problem.


Best Regards,
Stephen Tao

freginier
Solution Sage
Solution Sage

See this

https://stackoverflow.com/questions/51947441/power-bi-how-to-use-python-with-multiple-tables-in-the-...

 

One of my script I merge two existing queries with python statement

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i44FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
    #"Run Python script" = Python.Execute("# Python:#(lf)import pandas as pd#(lf)df3 = pd.merge(df1, df2, how = 'left', on = ['Date'])",[df1=Table1, df2=Table])
in
    #"Run Python script"

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

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.