Pandas three data structures:
- Series (
Series
) - Data frame (
DataFrame
) - Panel (
Panel
)
These data structures, built on Numpy array, which means that they soon
Dimensions and description
The best way to consider these data structures, the high-dimensional data structure which is a container lower-dimensional data structure . For example, DataFrame
a Series
container, Panel
a DataFrame
container.
data structure | dimension | description |
---|---|---|
series | 1 | 1 D markers uniform array, the same size. |
Data Frame | 2 | General 2 D markers, variable-sized structure on the underlying table column type heterogeneity. |
panel | 3 | General 3 D markers, variable-sized array. |
Construction and processing two or more dimensional array is a tedious task, the direction of the user function to be considered in the preparation of the data set. But using Pandas data structure, reducing the user's thinking. For example, using the table data ( DataFrame
), for taking into account more semantically index (rows) and columns instead of the shaft 0
and the shaft 1
.
Variability
All Pandas data structure is a variable value (can be changed), in addition to the series is the size of the variable. Series is the same size.
NOTE -
DataFrame
is widely used, is one of the most important data structure. Panel uses much less.
First, the series
Series is one-dimensional array with a uniform data structure. For example, the following series of integers: 10
, 23
, 56
, ...
collection.
key point
- Uniform data
- The same size
- Value of the variable data
Second, the data frame
Data frame ( DataFrame ) is a two-dimensional array having heterogeneous data. E.g,
Full name | age | gender | grade |
---|---|---|---|
Maxsu | 25 | male | 4.45 |
Katie | 34 | Female | 2.78 |
Vina | 46 | Female | 3.9 |
Laia | Female | x female | 4.6 |
Data are expressed as the table rows and columns. Each column represents a property, each row represents a person.
Column's data type
The data above four types of data frames as follows:
Row | Types of |
---|---|
Full name | String |
age | Integer |
gender | String |
grade | Float |
key point
- Heterogeneous Data
- Variable size
- Variable data
Third, the panel
Panel is a three-dimensional data structure having heterogeneous data. In the graphical representation is difficult to express panel. However, a panel may be described as DataFrame
a container.
key point
- Heterogeneous Data
- Variable size
- Variable data