Series in Pandas
In this lesson, the series object of pandas is explained
We'll cover the following...
Series #
Series
can be described as a single column of a 2-D array or a matrix. It has specific index values attached to each row for identification. It can also be imagined as one column of an excel file.
The index values are automatically defined for each Series
when it is created. These values can also be explicitly defined.
Let’s look at an example to understand this:
Press + to interact
# importing pandas in our programimport pandas as pd# Defining a series objectsrs = pd.Series([1,2,3,4,5])# printing series valuesprint("The Series values are:")print(srs.values)# printing series indexesprint("\nThe Index values are:")print(srs.index.values)
The srs.values
function on line 9 returns the values stored in the Series
object and the function ...
Access this course and 1400+ top-rated courses and projects.