Reading feather files in Power BI
Now that we know how to set up our local virtual environment and install the required packages, we can start reading the feather file in Power BI. First act...
-V:3.9 Python 3.9 (64-bit)
The *
indicates the default version.
Now open a command prompt like Windows Terminal and create a new folder, for example C:\pythonvenvs
. Navigate to this folder and type python -m venv myenv
. This will create a new virtual environment in the folder myenv
. To activate the virtual environment, navigate to the Scripts
folder and type activate
. Or from the root folder of the virtual environment, type .\myenv\Scripts\activate
. You can check if the virtual environment is activated by checking the command prompt. The name of the virtual environment should be displayed in the prompt.
Note the activate
command is in Windows Terminal with Powershell. If you are making use of a command prompt like DOS then use activate.bat
instead.
To deactivate the virtual environment, simply type deactivate
in the command prompt. This will deactivate the virtual environment and you will return to the global Python installation.
Now that the virtual environment is activated, you can install packages without affecting the rest of the system. For example, you can install the requests
package by typing pip install requests
. This will install the requests
package in the virtual environment. You can check the installed packages by typing pip list
.
Usual packages to install are numpy, pandas and matplotlib. These packages are used for data manipulation and visualization. You can install these packages by typing pip install numpy pandas matplotlib
. Note that if you run a pip list
you will see the installed packages but likely also a bunch of other packages that got installed as dependencies. This is normal and is the result of the package manager installing the packages that are required by the packages you installed.
Leave a Comment