python Import pandas Specific Steps and Methods

  • 2021-06-29 11:32:43
  • OfStack

Pandas was originally developed as a financial data analysis tool, so pandas provides a good support for time series analysis.

The name Pandas comes from panel data (panel data) and python data analysis (data analysis).panel data is a term used in economics to refer to cubes, and the panel data type is also available in Pandas.

Data structure:

Series:1-dimensional array, similar to one-dimensional array in Numpy.They are also similar to List, the basic data structure of Python. The difference is that elements in List can have different data types, while only the same data types are allowed to be stored in Array and Series, which can make more efficient use of memory and improve the operation efficiency.

Time-Series: Series indexed by time.

DataFrame:2-dimensional tabular data structure.Many functions are similar to data.frame in R.DataFrame can be understood as a container for Series.The following is mainly DataFrame.

Panel: A 3-dimensional array, which can be interpreted as a container for DataFrame.

Pandas has two unique basic data structures.Readers should note that although it has two data structures, it is still a library of Python, so data types in Python still apply here, as well as using classes to define data types themselves.However, there are two types of data defined in Pandas: Series and DataFrame, which make data manipulation easier.

Since pandas is the third-party library of python, you need to install one before using it. pandas and related components will be installed automatically if you use pip install pandas directly

Import the pandas module using aliases, and import the Series module based on this import.


from pandas import Series

import pandas as pd


Related articles: