Power BI: How to use Python with multiple tables in the Power Query Editor?

前端 未结 2 1526
Happy的楠姐
Happy的楠姐 2020-11-29 10:25

How can you create a new table with a Python script that uses two existing tables as input? For example by performing a left join using pandas merge?

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 11:22

    You can create a Blank Query and replace its contents in Advanced Editor:

    let
        Source = Python.Execute("# Python:#(lf)",[df1=Table1, df2=Table2])
    in
        Source
    

    After you can click on the gear by the Source to add your python code where you can use df1 and df2.

提交回复
热议问题