1In [1]: df = pd.DataFrame(np.random.rand(5,2),index=range(0,10,2),columns=list('AB'))
2
3In [2]: df
4Out[2]:
5 A B
60 1.068932 -0.794307
72 -0.470056 1.192211
84 -0.284561 0.756029
96 1.037563 -0.267820
108 -0.538478 -0.800654
11
12In [5]: df.iloc[[2]]
13Out[5]:
14 A B
154 -0.284561 0.756029
16
17In [6]: df.loc[[2]]
18Out[6]:
19 A B
202 -0.470056 1.192211