IniziaInizia gratis

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.

Questo esercizio fa parte del corso

Introduction to NumPy

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Create an array which contains row data on the largest tree in tree_census
largest_tree_data = ____
print(largest_tree_data)
Modifica ed esegui il codice