python pandas | Sololearn: Learn to code for FREE!

+2

python pandas

I need some explanation for head() method in pandas

9/18/2017 12:35:35 PM

Abdelrahman Hamoda

2 Answers

New Answer

+1

Complete the code to inspect the first five rows of the DataFrame boston: boston.head(n = 5)

0

It is used to display the first n rows (default value = 5) of a dataframe. This method is useful when you want to preview only a few select rows of a huge dataset. Check out the official documentation: https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.head.html