Fundamental Data Structures in pandas

Let's start with two fundamental data structures in pandas: Series and DataFrame.

We'll cover the following

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 or list.
  • A Numpy ndarray.
  • A scalar value.

Get hands-on with 1200+ tech skills courses.