Fundamental Data Structures in pandas
Let's start with two fundamental data structures in pandas: Series and DataFrame.
Series
Series is a one-dimensional array consisting of elements of multiple data types such as int, float, string, and object.
It’s just like an N-dimensional NumPy array (ndarray
) with an index. You can explicitly specify an index for a Series object, which can be either int or string type. When the specified index is not provided, Series automatically starts at zero and creates an index for the data with a step size of one.
You can create a series from:
- A Python
dictionary
orlist
. - A Numpy
ndarray
. - A scalar value.
Access this course and 1400+ top-rated courses and projects.