Installing software on your devices can vary wildly in complexity, and for some types of software, it’s a daunting task. This is especially true for developers installing software to aid in the development process. However, with software development, installing software made to assist in developing software, you can already see the recursion happening here.
In this post, you will learn how to install a specific piece of software called pandas, used to aid in Python software development. You will learn the two most common methods used to install pandas in a step-by-step format and you will become familiar with resources that will help you in the case of any installation errors.
This post assumes that you have the latest version of Python installed; if you do not, please head over to the Python Website and download the installer.
Let’s climb this tree and get an overview of the installation process.
How to Install Pandas Using PIP
With the latest version of Python installed, start by opening your CMD terminal; if you can not find it, use the windows search bar. Once you have located and ran the application, you will see something like the following.
With the command prompt open and your terminal ready, there is only one step left, and that is to enter the installation command. The installation command looks like the following line of code.
pip install pandas
The command is simple but let’s break it down to understand how it works. The acronym pip stands for “preferred installer program” and is a package manager installed with new versions of Python. You can easily install any Python package for your software development using it.
The next word in the command install is a directive that tells the package manager what you intend to do with it. The word after that is the package you wish to modify; in this case, the package you want is called pandas.
This line of code tells the Python pip manager to locate and install the pandas package. Once you have typed it in, hit the enter key and wait for the installation process to finish. Once completed, you will get a message that informs you of the success or failure of the installation process.
The following image will show you what your message could look like, provided no errors and a successful installation.
The above command shows that the process successfully installed pandas and any dependencies. However, this is not the only package manager you can use to install pandas; in fact, there is another package manager that is popular among Python developers.
How to Install Pandas in Anaconda
The Python community has vouched for the Anaconda software as it provides several tools that are all very powerful for working with large amounts of data. Furthermore, it also supports creating environments to help silo projects with different tools. This is good as it minimizes software dependencies that may not be necessary for some projects, which is outside the scope of this post.
Let’s look at the installation process when using the Anaconda software. First, you will need to head over to the Anaconda website and download the required installer for windows and your current version of Python.
Once you’ve located the installation page corresponding to your setup, download the program and install it. Then, following the prompts, go through the setup process and unclick the option Add Anaconda to my PATH environment variable, as seen below.
Click the install button and follow the remaining prompts to complete the installation at this point in the process. Once you have completed these steps and the setup is finished, you will have immediate access to the pandas library and any dependencies. To begin using the Anaconda software in your development, open the program and view your dashboard to access your pandas installation.
Using Pandas on Windows
Now that you have completed the installation process and have Python and pandas installed, you are ready to explore the process of using pandas. We’ve covered a lot and the two methods discussed here are simple, yet vastly different.
They both serve different purposes; installing Anaconda is highly recommended if you work with large amounts of data, such as data analysis or machine learning. However, installing pandas via the pip manager in most other cases should be an acceptable option
Your next steps could include creating your first pandas dataframe or learning more about the pandas syntax. If you used Anaconda to set up your pandas installation, then take some time to familiarize yourself with the features and tools that come with the program.