In [2]:
df
Out[2]:
a b c
1 4.0 7 10.0
2 5.0 8 11.0
3 NaN 9 NaN

Top Rows

Select the top n rows of the dataset.

In [3]:
df.head(2)
Out[3]:
a b c
1 4.0 7 10.0
2 5.0 8 11.0

Bottom Rows

Return the bottom n rows of the dataset.

In [4]:
df.tail(2)
Out[4]:
a b c
2 5.0 8 11.0
3 NaN 9 NaN