मराठी

Which of the following cammand will not show first five rows from the Pandas series named S1? - Informatics Practices

Advertisements
Advertisements

प्रश्न

Which of the following cammand will not show first five rows from the Pandas series named S1?

पर्याय

  • S1 [0 : 5]

  • S1.head ()

  • S1.head (5)

  • S1.head [0 : 5]

MCQ

उत्तर

S1.head [0 : 5]

Explanation:

S1.head[0:5]: The syntax is incorrect. To use the head() function correctly, use brackets instead of square brackets. This command will return a syntax error.

S1.head(): This command displays the default number of rows from the start of the Series. By default, the head() function displays the first five rows. This will display the top five rows; however, specifying (5) is suggested for clarity. 

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2023-2024 (February) Set 4
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×