Python Data Analysis - Introduction to Panas

1, Introduction to Pandas Data Structure

1. Series

Series is a one-dimensional array type object that contains a sequence of values (similar to the type in NumPy) and data labels, called indexes. The simplest sequence can be formed from just one array:

2. DataFrame

DataFrame represents the data table of a matrix, which contains a sorted set of columns, each of which can be of a different value type (numerical, string, Boolean, etc.). DataFrame has both row and column indexes, and can be viewed as a dictionary of Series that shares the same index. In DataFrame, data is stored as more than one two-dimensional block, rather than a collection of lists, dictionaries, or other one-dimensional arrays.

3. Index Object

The index objects in Pandas are used to store axis labels and other metadata, such as axis names or labels. When constructing Series or DataFrame, any array or label sequence you use can be internally converted into an indexed object.

2, Basic functions

1. Rebuild index

Reindex method.

2. Delete entries axially

The drop method returns a new object with an indicated value or an axial deletion value.

3. Indexing, selection, and filtering

4. integer index

5. Arithmetic and data alignment

6. Function application and mapping

7. Sorting and ranking

8. Axis index with duplicate labels

3, Overview and Calculation of Descriptive Statistics

1. Correlation and covariance

2. Unique value, count, and member properties