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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
v-stephen-msft
Community Support
Community Support

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 Specialist
Solution Specialist

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors