Pandas Tutorial – Learn Pandas Library

Pandas is a python library used for data manipulation and analysis. In this Pandas Tutorial, we will learn about the classes available and the functions that are used for data analysis.

Pandas Tutorials





Install Pandas Library

To install pandas, use the following pip command.

pip install pandas

Import Pandas

To import pandas python library, use the following statement in your program before using pandas classes.

import pandas

Usually an alias is used for pandas while using in a program. Use the following import statement.

import pandas as pd

Pandas Datastructure

Pandas has two types of Datastructures to deal with the data. They are:

  1. DataFrame
  2. Series

Pandas DataFrame

Pandas DataFrame is similar to R DataFrame. It stores two dimensional data with the structure similar to that of a table in databases.

Following is an example DataFrame.

names  us  india  china
0   Google  68     84     78
1    Apple  74     56     88
2  Samsung  77     73     82
3  OnePlus  78     69     87
Try Online