Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Pandas Tutorial

Pandas Tutorial

Pandas is an extension library for the Python language, used for data analysis.

The name Pandas derives from the term "panel data" (panel data) and "Python data analysis" (Python data analysis).

Pandas is an open-source, BSD-licensed library that provides high-performance, easy-to-use data structures and data analysis tools.

Pandas is a powerful toolset for analyzing structured data, based on Numpy(which provides high-performance matrix operations).


What you need to know before studying this tutorial

Before starting this Pandas tutorial, we need to have basic Python knowledge. If you are not yet familiar with Python, you can read our tutorial:


Pandas Applications

Pandas can import data from various file formats such as CSV, JSON, SQL, and Microsoft Excel.

Pandas can perform operations on various data, such as merging, reshaping, selection, as well as data cleaning and data processing features.

Pandas is widely used in various data analysis fields such as academia, finance, and statistics.


Pandas Features

Pandas is a powerful tool for data analysis; it not only provides efficient and flexible data structures, but also helps you complete complex data manipulation and analysis tasks at very low cost.

Pandas provides a rich set of features, including:


Data Structure

Pandas' main data structures are Series (one-dimensional data) and DataFrame (two-dimensional data).

Pandas is one of the indispensable tools in the field of Python data science; its flexibility and powerful features make data processing and analysis simpler and more efficient.


The First pandas Example

The following example creates a simple DataFrame:

Example

import

pandas

as

pd

Create a simple DataFrame

data

=

{

'Name'

:

[

'Google'

,

'Runoob'

,

'Taobao'

]

,

'Age'

:

[

25

,

30

,

35

]

}

df

=

pd.

DataFrame

(

data

)

View the DataFrame

print

(

df

)

The output of the code above is:

     Name  Age
0  Google   25
1  Runoob   30
2  Taobao   35

Related links