Python Pandas is a popular Python package that provides different data structures and data types in order to work with tabular, multidimensional data types and time series. Python Pandas is provided as a 3rd party package where it should be installed explicitly. Even though there are different types of installation methods using the pip package manager or command is the easiest and most reliable way to install Python pandas. The following instructions can be used to install pandas for both Linux distributions like Ubuntu, Debian, Mint, CentOS, and Windows operating systems like Windows 7, Windows 8, Windows 10, and Windows server.
Install Pandas For Python2 with pip Command
Even though Python2 is an older version of Python and currently the usage percentage is decreasing day by day you may need to install Pandas for Python2. In order to work with the Python2 package, the
pip2 command is used. First, we will list the Python2 pandas package information with the following command.
$ pip2 show pandas
and then we can install the Pandas package with the following install command.
$ pip2 install pandas
Install Pandas For Python3 with pip Command
Python3 is the current and most popular version of the Python programming language. Today all Python applications are developed with the Python version3 and older applications are migrated into Python3. We can install the pandas package for Python3 by using the
pip3 command. But first, we will list information about the pandas package below.
$ pip3 show pandas
and then we can install pandas package with the pip3 command like below.
$ pip3 install pandas
Install Pandas with Visual Studio
Visual Studio is a popular IDE that also supports Python. We can use Visual Studio in order to install Python Pandas. The Visual Studio GUI can be used to install Pandas.
Python Environmentvia CTRL+K or
pandasthe search field.
Run command: pip install pandas.
Install Python Pandas via Linux Package Managers (apt, apt-get,yum,dnf)
Most of the Linux distributions provide the popular Python packages via their package management systems. Even if the version of the packages are not so up-to-date they can be used to install 3rd party python packages like pandas. We can use package managers to install Python Pandas.
Debian, Ubuntu, Mint, Kali:
$ sudo apt install python3-pandas
$ sudo apt-get install python3-pandas
Fedora, CentOS, RHEL
$ sudo dnf install python3-pandas
$ sudo yum install python3-pandas