Python – Pandas Data Structure (series, panel & Dataframe)

Pandas in Python deals with three data structures namely

  • Series
  • DataFrame
  • Panel

 

Dimensions and Descriptions of Pandas Datastructure:

  • Series – 1D labeled homogeneous array, sizeimmutable
  • Data Frames – 2D labeled, size-mutable tabular structure with heterogenic columns
  • Panel – 3D labeled size mutable array.

 

Series in Pandas:

Series is a one-dimensional array with homogeneous data.  All the elements of series should be of same data type

Example:

12 9 7 6 11 5

 

A D T E P V 


Key Features of a Series:

  • Homogeneous data
  • Size Immutable –size cannot be changed
  • Values of Data Mutable

 

DataFrame in pandas:

DataFrame is a two-dimensional array with heterogeneous data, usually represented in the tabular format. The data is represented in rows and columns. Each column represents an attribute and each row represents a person.

Name City Exam date score
Arindam Bangalore 15-Jan 76
Ally Washington 23-Apr 56
jackson London 12-Feb 86
ivy Madrid 8-Jul 67

Key Features of a DataFrame:

  • Heterogeneous data
  • Size Mutable
  • Data Mutable

 

Panel in pandas:

Panel is a three-dimensional data structure with heterogeneous data.

Key Features of a Panel:

  • Heterogeneous data
  • Size Mutable
  • Data Mutable

 

previous Python - Pandas Data Structure                                                                                                          next Python - Pandas Data Structure

Author

  • Sridhar Venkatachalam

    With close to 10 years on Experience in data science and machine learning Have extensively worked on programming languages like R, Python (Pandas), SAS, Pyspark.

    View all posts