Get data from Python in Power BI is a possible. Python is one of the most popular programming languages. Several websites consider Python as the #1. Even the DBAs feel some pressure to learn Python. SQL Server included some features to integrate with Python and run python code. Power BI is not the exception. In this article, we will learn to get data from Python and send it to Power BI.
First of all, I will use a Windows Machine with Power BI Desktop installed.
Finally, internet access to download the installer.
First, you need to have Python installed. As we said before, Python is a pretty nice programming language. It includes a lot of useful libraries to handle data and to create advanced statistical graphics. That is why it is so popular and used in Power BI. The following link provides the Python installer: Python installer
Also, you need to have Pandas installed on your machine. This is a Python library used to manipulate and analyze data. To install Pandas, use the following command line.
pip install pandas
Enable Python in Power BI
In order to have Python enabled, in the Power BI Desktop, in the menu go to File>Options and settings and select options.
In addition, go to Python scripting and check if the home directory and the detected Python IDEs were detected.
Getting Data from Python in Power BI
Once we have everything ready, press the Get data icon.