Informatics Practices
To display last five rows of a series object 'S', you may write :
- S.Head()
- S.Tail(5)
- S.Head(5)
- S.tail()
Python Pandas
1 Like
Answer
S.tail()
Reason — The syntax to display the last n rows of a Series object is <Series Object>.tail([n]). Therefore, according to this syntax, S.tail() will display last five rows of a Series object S.
Answered By
2 Likes
Related Questions
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
What will be the output of the following code ?
import pandas as pd myser = pd.Series([0, 0, 0]) print(myser)- 0 0
0 0
0 0 - 0 1
0 1
0 2 - 0 0
1 0
2 0 - 0 0
1 1
2 2
- 0 0
Missing data in Pandas object is represented through :
- Null
- None
- Missing
- NaN
In Python Pandas, while performing mathematical operations on series, index matching is implemented and all missing values are filled in with …………… by default.
- Null
- Blank
- NaN
- Zero