Introduction To Data Structures
Introduction To Data Structures
A data structure is used to store data in an organized structure to make data manipulation and other data operations more efficient.
Pandas deals with the following three data structures −
- Series
- DataFrame
- Panel
These data structures are built on top of the Numpy array, which means they are fast.
Dimension & Description
Creating and handling two or more dimensional arrays is a tedious task, which is burdened by considering the orientation of data set by the user for writing tasks. But using pandas data structures, the user's mental effort is reduced.
For example, with tabular data (DataFrame) it is more useful to think about indexes (rows) and columns instead of axis 0 and axis 1.
Mutability
The data structures of all pandas can be mutable (can be changed) and all sizes are mutable, except series. The chain shape is immutable.
Note - Dataframes are widely used and one of the most important data structures. The panel is rarely used.
Series
Series is a one-dimensional array-like structure with homogeneous data. For example, the following series is a collection of integers 10, 23, 56, …
Key Points
A DataFrame is a two-dimensional array with heterogeneous data.
The table shows the data of an organization's sales team along with their overall performance rating. The data is represented in rows and columns. Each column represents an attribute and each row represents an individual.
For more related articles and courses visit InsideAIML

Comments
Post a Comment