This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.