Examples

In [1]:
import numpy as np
import pandas as pd
In [2]:
df = pd.DataFrame({'animal':['dog', 'bee', 'cat', 'lion',
                   'monkey', 'tiger', 'fox', 'wolf', 'zebra']})
df
Out[2]:
animal
0 dog
1 bee
2 cat
3 lion
4 monkey
5 tiger
6 fox
7 wolf
8 zebra

Viewing the last 5 lines

In [3]:
df.tail()
Out[3]:
animal
4 monkey
5 tiger
6 fox
7 wolf
8 zebra

Viewing the last n lines (three in this case)

In [4]:
df.tail(3)
Out[4]:
animal
6 fox
7 wolf
8 zebra