How it works...

The first parameter of the nlargest method, n, must be an integer and selects the number of rows to be returned. The second parameter, columns, takes a column name as a string. Step 2 returns the 100 highest scoring movies. We could have saved this intermediate result as its own variable but instead, we chain the nsmallest method to it in step 3, which returns exactly five rows, sorted by budget.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.128.145