This recipe can be used to create catchy news headlines such as Out of the top 100 best universities, these 5 have the lowest tuition or From the top 50 cities to live, these 10 are the most affordable. During an analysis, it is possible that you will first need to find a grouping of data that contains the top n values in a single column and, from this subset, find the bottom m values based on a different column.
Selecting the smallest of the largest
Getting ready
In this recipe, we find the five lowest budget movies from the top 100 scoring movies by taking advantage of the convenience methods, nlargest and nsmallest.