Thanks to theidioms.com

Installing and Importing Pandas

pandas full course
Tutorial

Installing and Importing Pandas

In this lesson, you will learn how to install and import Pandas in Python. You will also learn how to check the version of the installed Pandas library.


Installing Pandas in Python using pip

Pandas can be installed using the Python Package Manager, pip, as follows:

$ pip install pandas

Note: If you are using Anaconda, Pandas comes pre-installed.


Importing Pandas in Python

Starting from this section onwards, we will be using Jupyter Notebooks as our Python IDLE. If you do not have Jupyter Notebook, you can follow this guide to install it.

To import Pandas in Python and check the currently installed version, write the following code in a new cell of Jupyter Notebook and run it (shift+enter):

# Library import convention
import pandas as pd 

# Check version of pandas installed
print(pd.__version__) # printed version: 1.0.1

If your Pandas version is greater than 1.0.0, then everything is now ready!


Now you can finally start analyzing and manipulating data in Python. Head over to the next chapter to learn about one of the data structures used in Pandas, called the Pandas Series.

Leave your thought here

Your email address will not be published. Required fields are marked *