How to Install Pandas

Posted on


This is an article where the main focus is just to show how to install Pandas. Actually, Pandas is the most popular module or library exist n Python programming language for data analysis. It is an open source module or library providing specific data structure for a simple data usage and processing. Furthermore, it is also providing a tool analysis.

Pandas Installation

But in order to use Pandas library further, it need to exist first. In this case, it is using a device running Microsoft Windows. Furthermore, the installation of Pandas library will be available in a command prompt. It is obvious since the installation process is requiring the execution of a simple command in a command line exist in Windows Command Prompt. So, in order to have Pandas library, just install it by performing the following steps :

  1. First of all, the most important thing to do is to execute the Microsoft Windows’ command prompt. For another operating system, just execute any available command console.

    Microsoft Windows [Version 10.0.22000.856]
    (c) Microsoft Corporation. All rights reserved.
  2. Before executing the ‘pip’ tool, just consider on the availability of the ‘tool’. In order to check it, just type ‘pip’ in the Command Prompt as in the example below :

    pip <command> [options]
    install Install packages.
    download Download packages.
    uninstall Uninstall packages.
    freeze Output installed packages in requirements format.
    list List installed packages.
    show Show information about installed packages.
    check Verify installed packages have compatible dependencies.
    config Manage local and global configuration.
    search Search PyPI for packages.
    cache Inspect and manage pip's wheel cache.
    index Inspect information available from package indexes.
    wheel Build wheels from your requirements.
    hash Compute hashes of package archives.
    completion A helper command used for command completion.
    debug Show information useful for debugging.
    help Show help for commands.
    General Options:
    -h, --help Show help.
    --debug Let unhandled exceptions propagate outside the main subroutine, instead of logging them
    to stderr.
    --isolated Run pip in an isolated mode, ignoring environment variables and user configuration.
    --require-virtualenv Allow pip to only run in a virtual environment; exit with an error otherwise.
    -v, --verbose Give more output. Option is additive, and can be used up to 3 times.
    -V, --version Show version and exit.
    -q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to
    WARNING, ERROR, and CRITICAL logging levels).
    --log <path> Path to a verbose appending log.
    --no-input Disable prompting for input.
    --proxy <proxy> Specify a proxy in the form scheme://[user:passwd@]proxy.server:port.
    --retries <retries> Maximum number of retries each connection should attempt (default 5 times).
    --timeout <sec> Set the socket timeout (default 15 seconds).
    --exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup,
    --trusted-host <hostname> Mark this host or host:port pair as trusted, even though it does not have valid or any
    --cert <path> Path to PEM-encoded CA certificate bundle. If provided, overrides the default. See 'SSL
    Certificate Verification' in pip documentation for more information.
    --client-cert <path> Path to SSL client certificate, a single file containing the private key and the
    certificate in PEM format.
    --cache-dir <dir> Store the cache data in <dir>.
    --no-cache-dir Disable the cache.
    Don't periodically check PyPI to determine whether a new version of pip is available for
    download. Implied with --no-index.
    --no-color Suppress colored output.
    Silence deprecation warnings for upcoming unsupported Pythons.
    --use-feature <feature> Enable new functionality, that may be backward incompatible.
    --use-deprecated <feature> Enable deprecated functionality, that will be removed in the future.

    Fortunately, the ‘pip’ tool is already exist in the device which in the example is running Microsoft Windows’s operating system. As a reference, just take a look at the article with the title of ‘How to Install pip in Microsoft Windows’ in this link. Furthermore, just visit the article in this link with the title of ‘How to Install pip in Microsoft Windows 11’.

  3. Next, after ensuring ‘pip’ tool is available, just list the already existing Python module or library by typing the following command :

    C:\Users\Personal>pip freeze

    In the above command, it is just trying to make sure that ‘Pandas’ library is currently not available yet. Obviously, it does not exist yet. Since in this case, the content of this article is going to show the ‘Pandas’ installation step. As an additional reference, just check this link which is an article with the title of’How to List Installed Packages and Version using pip tool’.

  4. After ensuring that ‘Pandas’ library is currently not available, just search the ‘Pandas’ library whether it is possible and it is exist for further download and installation process. In this context, there is a tool with the name of ‘pip_search’ which is useful to do it. Below is an example for performing it :

    C:\Users\Personal>python -m pip_search pandas
    🐍 🐍
    │ Package                   │ Version   │ Released   │ Description                                                                            │
    │ 📂 pandas2                  0.0.0       18-09-2017    pandas2                                                                               
    │ 📂 pandas                   1.4.3 ==    23-06-2022    Powerful data structures for data analysis, time series, and statistics               
    │ 📂 Pandas3                  0.0.1       21-08-2019    Boto3 extension to help facilitate data science workflows with S3 and Pandas 

    For further information about how to search Python module or library How to Search Package, Module or Library Python using pip_search

  5. Finally, just execute the following command in order to install the ‘Pandas’ library :

    pip install pandas

    But in this context, since it is important to use the specific python’s version, it will include ‘python’ command in the installation command as follows :

    C:\Users\Personal>python -m pip install pandas
    Collecting pandas
    Using cached pandas-1.4.3-cp310-cp310-win_amd64.whl (10.5 MB)
    Collecting python-dateutil>=2.8.1
    Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
    Collecting pytz>=2020.1
    Downloading pytz-2022.2.1-py2.py3-none-any.whl (500 kB)
    ---------------------------------------- 500.6/500.6 KB 1.7 MB/s eta 0:00:00
    Collecting numpy>=1.21.0
    Downloading numpy-1.23.2-cp310-cp310-win_amd64.whl (14.6 MB)
    ---------------------------------------- 14.6/14.6 MB 1.3 MB/s eta 0:00:00
    Collecting six>=1.5
    Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
    Installing collected packages: pytz, six, numpy, python-dateutil, pandas
    WARNING: The script f2py.exe is installed in 'C:\python\python310\Scripts' which is not on PATH.
    Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
    Successfully installed numpy-1.23.2 pandas-1.4.3 python-dateutil-2.8.2 pytz-2022.2.1 six-1.16.0
    WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available.
    You should consider upgrading via the 'C:\python\python310\python.exe -m pip install --upgrade pip' command.

Leave a Reply