Data Structures in Pandas          Â
Prior to Pandas, Python was only used for data wrangling and preparation. Using Pandas we can perform more steps in the processing and analysis of data- Load, Prepare, Manipulate, Model, and Analyze using its powerful data structures.
Data Structures in Pandas
Pandas have three types of data structures-
These all are built with a Numpy array.
A Series is a one dimensional array like structure with homogeneous data. The values of the series are mutable means we can change any value in series, but the size of the series is immutable so we can not change the size of the series. A series can hold any type of data like integer, decimal, string, python objects, etc. For Example
15 | 20 | 4 | 9 | 40 | 10 |
20.1 | 2.5 | 4.6 | 9.7 | 20.3 | 1.8 |
in the above example, Series 1 has integer numbers whereas Series 2 has decimal numbers so it is called homogeneous. we can not put a decimal number in an integer number series or any integer number in any decimal number series.
DataFrame is a two-dimensional array with heterogeneous data. A DataFrame size is mutable and data is also mutable so we can change the data and size of DataFrame at any time. For example
The table represents the data of a company employee. The data is represented in rows and columns. Each column represents an attribute and each row represents a person.
3. Panel
The panel is a three-dimensional data structure with heterogeneous data. It is very hard to represent the Panel in a graphical representation. But a Panel can be illustrated as a container of a DataFrame. In Panel Data and size are mutable.
The difference among Series, DataFrame, and panel
Data Structure | Dimensions | Data Type | Data | Size |
---|---|---|---|---|
Series | One-dimensional array | Homogeneous data | Mutable | Immutable |
Data Frame | Two-dimensional array | Heterogeneous data | Mutable | Mutable |
Panel | Three-dimensional array | Heterogeneous data | Mutable | Mutable |
It is what I was searching for is really informative.Data Structure Assignment online Experts It is a significant and useful article for us. Thankful to you for sharing an article like this.