Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hello!
I need to load a Python script fro a file and execute it in Power Query.
The idea is:
let
Source = File.Content("python.py"), // or "somefile.txt"
Script = Python.Execute(Source),
.... following code
in
How to skip text splitting and get just the script code into Source?
Thanks in advance.
Solved! Go to Solution.
Usually Text.FromBinary ...
Note that this opens you to code injection attacks.
Note that the pyton script is supposed to return a dataframe.
Usually Text.FromBinary ...
Note that this opens you to code injection attacks.
Note that the pyton script is supposed to return a dataframe.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
| User | Count |
|---|---|
| 16 | |
| 9 | |
| 8 | |
| 7 | |
| 7 |