Filtering with masks
In the last lesson, you sorted trees from smallest to largest. Now, you'll use fancy indexing to return the row of data representing the largest tree in tree_census
. You'll also examine other trees located on the same block as the largest tree: are they also large?
numpy
is loaded as np
, and the tree_census
array is available. As a reminder, the tree_census
columns in order refer to a tree's ID, its block ID, its trunk diameter, and its stump diameter.
This exercise is part of the course
Introduction to NumPy
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Create an array which contains row data on the largest tree in tree_census
largest_tree_data = ____
print(largest_tree_data)