What is the primary difference between a Pandas Series and a Pandas DataFrame?
2026
What is the primary difference between a Pandas Series and a Pandas DataFrame?
- A.
A series is 3D, while a DataFrame is 2D.
- B.
A series is a 1D array-like object with labels, whereas a DataFrame is a 2D table-like structure with rows and columns.
- C.
DataFrames can only store numbers, while series can store any data type.
- D.
Series are used for time-series data only, while DataFrames are for static data.
Attempted by 125 students.
Show answer & explanation
Correct answer: B
A Pandas Series is a one-dimensional labeled array capable of holding any data type. In contrast, a Pandas DataFrame is a two-dimensional labeled data structure with columns of potentially different types. The key difference lies in their dimensionality: Series is 1D, while DataFrame is 2D.