Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I am trying to import a custom python library in to either Power BI or Excel. I assume that libraries like pandas, numpy etc are included. Is there a way to get around this? Generally for conda - I would do a pip install and start using it.
Any thoughts or suggestions?
Solved! Go to Solution.
Hi, @rnambiar
Thanks for the reply from Kedar_Pande , please allow me to provide addition:
Excel now supports Python integration, allowing you to use Python directly in Excel cells. However, this feature is limited to some built-in libraries. You can use the =PY function to write Python code in Excel cells, but custom libraries still need to be preprocessed outside of Excel. You can check the following link:
Open-source libraries and Python in Excel - Microsoft Support
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@rnambiar ,
In Power BI, you can use built-in Python libraries like pandas and numpy. However, you cannot install custom libraries directly via pip or conda.
Workaround- Use another Python environment to preprocess data with your custom library, then export it (e.g., CSV) and import it into Power BI.
To use Python in Power BI go to Transform Data > Run Python Script.
If this helped, a Kudos 👍 or Solution mark would be great!
Cheers,
Kedar Pande
www.linkedin.com/in/kedar-pande
Thank you. That works with Power BI. Is there a way to accomplish the same in excel without having to go outside of excel to preprocess the data. I'd like to be able to share this file with other users who dont use Python.
Hi, @rnambiar
Thanks for the reply from Kedar_Pande , please allow me to provide addition:
Excel now supports Python integration, allowing you to use Python directly in Excel cells. However, this feature is limited to some built-in libraries. You can use the =PY function to write Python code in Excel cells, but custom libraries still need to be preprocessed outside of Excel. You can check the following link:
Open-source libraries and Python in Excel - Microsoft Support
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sorry, I am not an expert in Excel.
If this helped, a Kudos 👍 or Solution mark would be great!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
69 | |
68 | |
40 | |
29 | |
26 |
User | Count |
---|---|
87 | |
49 | |
45 | |
38 | |
37 |