Directions: Extract the 14th column in "taxi_first_five" . Assign to "fare_totals"
fare_totals= taxi_first_five- taxi_first_five
What actually happened:
IndexError: index 14 is out of bounds for axis 0 with size 5
The correct answer is
fare_totals = taxi_first_five[:,13] but I don’t understand the logic of it. Can you please help me?
taxi_first_five variable has the first 5 rows only. Hence, if you check the variable you could see that
taxi_first_five has 5 rows and 14 columns.
taxi_first_five, you are trying to access the 13th row in
taxi_first_five, which doesn’t exist. That’s why you are getting the
This will assign all the rows in the 13th column of
taxi_first_five, which is the
Is it clear now?