Pandas documentation has this Boolean list with the same length as the row axis example, like so:
>>> df = pd.DataFrame([[1, 2], [4, 5], [7, 8]],
... index=['cobra', 'viper', 'sidewinder'],
... columns=['max_speed', 'shield'])
>>> df
max_speed shield
cobra 1 2
viper 4 5
sidewinder 7 8
>>> df.loc[[False, False, True]]
max_speed shield
sidewinder 7 8
Can someone please explain how the df.loc[[False, False, True]] works to get the result shown please?
Thanks.