KnowledgeBoat Logo
|

Informatics Practices

To display third element of a Series object S, you will write …………… .

  1. S[:3]
  2. S[2]
  3. S[3]
  4. 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