Built with Tutify.io

    AIStudyLabs

    Install Anaconda & Run Pandas on Jupyter Notebook

    Install Anaconda & Run Pandas on Jupyter Notebook

    Jupyter Notebook is the most widely used tool in the scientific community for running Python and R programming. hence let's learn how to install Anaconda and run Pandas programs on Jupyter Notebook. In this article, I will cover step-by-step instructions of installing anaconda and running pandas programs on Jupyter Notebook.

    Table of Contents:

    <a id="Download-and-Install-Anaconda-Distribution"></a>

    1. Download & Install Anaconda Distribution

    Follow the below step-by-step instructions to install Anaconda on windows. If you already have anaconda distribution installed then jump to Run pandas From the Command Line section.

    1.1 Download Anaconda Distribution

    Go to https://anaconda.com/ and select Anaconda Individual Edition to download the latest version of Anaconda. This downloads the .exe file to the windows download folder.

    1.2 Install Anaconda on Windows

    By double-clicking the .exe file starts the Anaconda installation. Follow the below screen shot's and complete the installation

    This finishes the installation of Anaconda distribution. Now let's see how to install pandas.

    <a id="installing-pandas-using-conda-command"></a>

    2 Installing pandas using conda command

    2.1 Open Anaconda Navigator from the Windows Start or Search Box.

    2.2 Create Anaconda Environment

    Creating an environment beforehand is optional but advisable. It ensures a clear separation of package installations for each project you undertake. If you already have an existing environment, you can utilize that as well.

    2.3 Open Anaconda Terminal

    You open the Anaconda terminal from Anaconda Navigator or open it from the windows start menu/search.

    <a id="h-2-4-install-pandas-using-conda"></a>

    2.4 Install Pandas using Conda

    Now, enter conda install pandas to install pandas in your environment. Note that this command will also install several other packages, including the widely used numpy.

    <a id="Run-pandas-From-Command-Line"></a>

    3. Run Pandas From Command Line

    Now, open the Python terminal by typing python on the command line, then run the following command at the prompt >>>.

    
    >>> import pandas as pd
    >>> pd.__version__
    '1.3.2'
    >>>
    

    Executing pandas commands from the terminal is not practical for real-time use.

    <a id="Run-pandas-From-Jupyter-Notebook"></a>

    4. Run Pandas From Jupyter Notebook

    Let's explore how to run Pandas programs in Jupyter Notebook.

    Navigate to Anaconda Navigator -> Then go to Environments -> Select your environment (e.g., pandas-tutorial) -> select Open With Jupyter Notebook

    This will open Jupyter Notebook in your default browser.

    Now select New -> PythonX and enter the below lines and select Run.

    This completes installing Anaconda and running pandas on Jupyter Notebook. If you encounter any issues during installation, please leave a comment below. Your input could be helpful to others.

    Happy Learning !!

    <a id="h-related-articles"></a>

    Related Articles