Python.Execute is a Power Query M function that executes a Python script and returns data frames.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365


   script as text,
   optional arguments as nullable record,
) as table


Executes Python script and returns data frames

Python.Execute( "a = pandas.DataFrame( dataset[dataset.columns[0]] )", [dataset=#"Source"] )

Other functions related to Python.Execute are:

BI Gorilla Youtube Channel

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.