It is possible to replicate specific cases of boolean selection by taking advantage of the index. Selection through the index is more intuitive and makes for greater readability.
Replicating boolean indexing with index selection
Getting ready
In this recipe, we use the college dataset to select all institutions from a particular state with both boolean indexing and index selection and then compare each of their performance against one another.
How to do it...
- Read in the college dataset and use boolean indexing to select all institutions from the state of Texas (TX): ...