1>>> df = pd.DataFrame([[1, 2], [4, 5], [7, 8]],
2... index=['cobra', 'viper', 'sidewinder'],
3... columns=['max_speed', 'shield'])
4>>> df
5 max_speed shield
6cobra 1 2
7viper 4 5
8sidewinder 7 8
9
10>>> df.loc[['viper', 'sidewinder']]
11 max_speed shield
12viper 4 5
13sidewinder 7 8
14
112 29.6
238 29.6
376 29.6
493 29.6
5172 29.6
6 ...
731097 29.6
836812 29.6
938278 29.6
1041460 29.6
1145698 29.6
12Name: mass, Length: 107, dtype: float64