quick question to clarify the functioning of boolean indexing.
For this exercise I do not understand where in the code I transfer the information that the tip_bool array should work to filter out trips with less than 50 tip.
In some way I need to tell the code to compare the tip_bool array with the column tip_amount as I am working on the full array taxi.
Is this information implicitly contained in the tip_bool array?
Thanks for your quick answer.
I do understand this.
As far as my understanding goes, with tip_bool I create - as you said - a boolean series with trues and falses. My question is where the information comes from that this is applied to the column where I have the data on the tip amount. Why isn’t this applied to the column with the length of the trip?
so here you selected every row in the 13th column (column in index 12)
Then after selecting the column you checked every element in the top_amount array if they are greater than 50. If an element is greater than 50 it will be True else False, hence making tip_bool a boolean array.
Using the boolean array (tip_bool) you selected all rows from taxi with values tip amounts of more than 50 , and the columns from indexes 5 to 13 inclusive.