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.
- Anaconda is the most widely used distribution platform for Python and R programming languages in the data science and machine learning community, streamlining the installation of packages such as pandas, NumPy, SciPy, and many more. The Anaconda distribution is built on Conda, a versatile package manager that is both cross-platform and language-agnostic, allowing for the installation of various third-party packages.
- Pandas is an open-source framework in Python to works with tabular data (rows and columns). pandas have DataFrame which is a two-dimensional data table and Series one dimensional. pandas will help you to explore, clean, and process your data in easy steps
- Jupyter Notebook is an interactive web-based environment for creating notebook documents with Python and R languages. These notebook documents function similarly to a REPL, offering features such as code completion, plots, and the integration of rich media.
Table of Contents:
- Download & Install Anaconda Distribution
- Install pandas on Anaconda
- Run pandas From the Command Line
- Run pandas From the Jupyter Notebook
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.
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.
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
.
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.
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 !!
Related Articles
- How to Install Anaconda on Windows
- Pandas Window Functions Explained
- How to Install Anaconda & Run Jupyter Notebook
- Install Pandas on Windows Step-by-Step
- Update Jupyter Notebook or Jupyterlab
- Install Python Pandas on Windows, Linux & Mac