Name the function that display top and bottom elements of a series
Answers
Answered by
4
Explanation:
tail() method is called on series with custom input of n parameter to return bottom 12 rows of the series. Output: As shown in the output image, top 12 rows ranging from 446 to 457th index position of the Salary column were returned.
Answered by
1
Answer:
The tail() and head().
Explanation:
The tail() and head() is used to display the top and botton element of a series. By default 5 elements will be provided but you can give the number according to your wish as an attribute.
For Example:
import pandas as pd
obj= pd.Series(range(41,71,3))
print(obj)
print('head elements are:')
print(obj.head(3))
print('Tail elements are:')
print(obj.tail(3))
Attachments:

Similar questions