Informatics Practices
To display third element of a Series object S, you will write …………… .
- S[:3]
- S[2]
- S[3]
- S[:2]
Python Pandas
2 Likes
Answer
S[2]
Reason — The syntax to access individual elements of a Series object is <Series Object name>[<valid index>]
. Therefore, according to this syntax, to display third element of a Series object S
with zero based indexing, S[2]
is correct.
Answered By
1 Like
Related Questions
To get the number of bytes of the Series data, …………… attribute is displayed.
- hasnans
- nbytes
- ndim
- dtype
To check if the Series object contains NaN values, …………… attribute is displayed.
- hasnans
- nbytes
- ndim
- dtype
To display first three elements of a Series object S, you may write …………… .
- S[:3]
- S[3]
- S[3rd]
- all of these
To display last five rows of a Series object S, you may write …………… .
- head()
- head(5)
- tail()
- tail(5)