Pandas Series — it is a one-dimensional array with axis labels. Tags do not have to be unique, but must be hashable. The object supports indexing based on integers and labels and provides many methods for performing index-related operations.
Series.iat
Pandas Series.iat
to one value for a row / column pair at an integer position.
Syntax: Series.iat
Parameter: None
Returns: return value at the specified location
Example # 1: Use the Series.iat
attribute to return the value present at the specified location for a given Series object.
|
Output:
Now we will use the Series.iat
to return the value at index 0.
|
Output:
As we can see in the output, the Series.iat
attribute returned & # 39; New York & # 39; which is the value present at index 0 in this Series object.
Example # 2: Use the Series.iat
attribute to return a value, present at the specified location for this Series object.
|
Output:
Now we will use the Series.iat
attribute to return the value at the second index.
|
Output:
As we can see from the output, the Series.iat
attribute returned "3/1/2018", which is the value present at the second index in this Series object.