Given this data frame:
In [40]: df = pd.DataFrame({'A': [1, 1], 'B': [2, 2], 'C': [3, 3]})
In [41]: df
Out[41]:
A B C
0 1 2 3
1 1 2 3
If I pass a list of strings to [], it will filter columns:
In [42]: df[['A', 'C']]
Out[42]:
A C
0 1 3
1 1 3
But if I pass a list of booleans to [], it will filter rows:
In [45]: df[[True, False]]
Out[45]:
A B C
0 1 2 3
Is there a way to think about this difference, rather than "it's just the way it is"?