Informatics Practices
To display last five rows of a Series object S, you may write …………… .
- head()
- head(5)
- tail()
- tail(5)
Python Pandas
2 Likes
Answer
tail(), tail(5)
Reason — The syntax to display the last n rows of a Series object is <Series Object>.tail([n]). Therefore, according to this syntax, tail(5) will display last five rows of a Series object S. If n value is not specified, then tail() will return the last 5 rows of a Series object.
Answered By
1 Like
Related Questions
To display third element of a Series object S, you will write …………… .
- S[:3]
- S[2]
- S[3]
- S[:2]
To display first three elements of a Series object S, you may write …………… .
- S[:3]
- S[3]
- S[3rd]
- all of these
Which of the following statement is wrong ?
- We can't change the index of the series
- We can easily convert the list, tuple, and dictionary into a series
- A series represents a single column in memory
- We can create empty series.
What type of error is returned by the following statement ?
import pandas as pa pa.Series([1, 2, 3, 4], index = ['a', 'b', 'c'])- Value Error
- Syntax Error
- Name Error
- Logical Error