Q. The head() and tail() extract rows or columns from a dataframe. Explain.


Answer =

Pandas head() method is used to return top n (5 by default) rows of a data frame or series.

Pandas tail() method is used to return bottom n (5 by default) rows of a data frame or series.

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post