Informatics Practices
Which of the following codes will display the total number of rows in the DataFrame stud?
- print (len(stud.axes[0]))
- print (stud.len(0) )
- print (stud.len [axes=0] )
- print (len (stud.axes[row] )
Python Pandas
2 Likes
Answer
print(len(stud.axes[0]))
Reason — The command stud.axes[0] gives access to the index labels along the 0th axis (rows) of the DataFrame stud. The len(stud.axes[0]) returns the length of this index label array, which corresponds to the total number of rows in the DataFrame stud.
Answered By
1 Like
Related Questions
Choose the correct statement to print the label in the line chart.
- pl.xlabel("some values")
- pl.xlable("some values")
- pl.plotlabel("some values")
- None of these
Which clause is used in query to place the condition on groups in MySQL?
- WHERE
- HAVING
- GROUP BY
- Both (i) & (ii)
Legal term to describe the rights of a creator of original creative or artistic work is called …………… .
- Copyright
- Copyleft
- GPL
- None of these
In SQL, which clause is used to select specific rows?