
10 Types of Programming Languages Every Coder should Know
Learn about different types of programming languages and how they are implemented in the real world.
Pandas is one of the most used open-source libraries which is primarily made for data analysis and manipulation, a highly crucial tool for any data analyst. The constant upgradation over this library gave us the most optimised version of pandas for handling a very large amount of data or data tables with several arithmetic applications simultaneously. Whether you use pandas for simple data manipulation or to handle complex statistical analysis, it offers a very rich set of tools and functionalities.
In this post, we are going to see how to install pandas in Python, an easy step-by-step guide. You can easily install Pandas in Python on your Windows, Linux or macOS, and also install Pandas through Anaconda by following these few easy steps.
To begin with, let’s first check if Python is already installed or not in your system using one simple command. Just open the Command Line by searching for cmd in the start menu or run the program dialogue.
Run the following command in your Command Prompt to check if Python is already installed on your system or not.
python –version
If Python is already installed on your system, then it shows the version of your installed Python, else it will return ‘python is not defined’. It is necessary to have Python before installing pandas.
Pip is the most reliable package installer for Python. It is generally embedded with Python, but you can verify its existence using the following command. If it is not available, you can download it using the official Pip installation guide.
pip –version
Or
pip3 –version

With Python and Pip installed, you can install Pandas using the command:
pip install pandas

Few dependencies will run and Pandas is installed on your Windows device and ready for use. If it shows an error, try to relocate and assign the environment variable Path for your Python in Windows.

POSTGRADUATE PROGRAM IN
Multi Cloud Architecture & DevOps
Master cloud architecture, DevOps practices, and automation to build scalable, resilient systems.
Upgrading your package list can reduce the number of errors while installing and ensure you get the latest information about available packages. Open the terminal and run:
sudo apt-get update
Most of the Linux Distributions come with pre-installed Python. To check it, use the following two commands.
pip3 –version
python3 –version

If it is not installed, you need to install a specific version by running the command given below.
sudo apt-get install python3-pip
Run the following command in the terminal to directly install the Pandas library.
pip3 install pandas

This will install the required dependencies and Pandas. Packages like NumPy, python-dateutil, pytz, tzdata, etc. will automatically be installed as they are essential for running Pandas libraries.
Open the terminal on your Mac and type the following commands to check the existence of Pip and Python.
python3 –version

If Python is not present on your system, you can either manually download the Python package from the official website and extract it to install it.
Or you can install it using Homebrew (Recommended). Homebrew is a package manager for macOS that will simplify the installation of any software. Install it using the following command.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then install Python using homebrew
brew install python
Check if Pip is present on your Mac or not
pip3 –version
If Pip is not present, you can use one simple command to install it.
sudo easy_install pip
Now, finally, using the pip command, you can easily install Pandas on your system.
pip3 install pandas

Go to the official website for downloading Anaconda for your operating system (Windows, macOS or Linux).
bash Anaconda3-<version>-Linux-x86_64.sh

After installing, launch Anaconda Navigator by using the start menu in Windows, or type ‘anaconda-navigator’ in the Linux terminal or search Anaconda in the Applications folder in macOS.

Here, you need to activate the new environment by writing the following command in the Anaconda Prompt.
conda activate myenv
Using Conda in your Anaconda terminal, you can install Pandas with the following command.
conda install pandas

In the activated environment, you can install Jupyter Notebook by running the following. Here, the process of installing Pandas is the same as that in step 5; you just need to install and open Jupyter Notebook to write any Pandas script.
conda install -c conda-forge notebook
Or you can use Pip for installation
pip install notebook
Then, start the Jupyter Notebook by manually launching it or by running a command in the terminal.
Jupiter notebook
After running, your default web browser will open as the Jupyter Notebook Interface. Hence, you just have to click on ‘New’ to create a new notebook and select ‘python3’ to install pandas. Finally, you can write different scripts containing Pandas library functions to verify the installation.

82.9%
of professionals don't believe their degree can help them get ahead at work.
You can easily verify the installation by opening an interactive Python file, Python shell or Jupyter file and running the following script. If it’s successfully installed, it will print the current Pandas version without showing errors.
<strong>File Name: test.py</strong>
# Importing Pandas
import pandas as pd
# Printing the version of Pandas
print("Pandas version:", pd.__version__)
In conclusion, installing Pandas is a very simple process with very few command operations, whether you are using Windows, macOS or Linux. You can follow this step-by-step guide to install Pandas in your system. Once installed, you can use all the powerful data manipulation features and analysis capabilities like various graphical representations of data by plot, and you can improve your productivity and efficiency while working with any kind of data for your organisation or personal use. You can unlock all potential and dive into the world of data science.
Updated on July 23, 2024

Learn about different types of programming languages and how they are implemented in the real world.

Explore 10 front-end development, including key languages, its advantages and disadvantages, and how it shapes user experience in web design and functionality.