All pandas problems
MediumSelection
Top-3 rows by revenue
Print the 3 highest-revenue rows in the whole file. `.nlargest()` is the shortcut every analyst reaches for.
- #nlargest
- #top-n
Sample input
same sales CSV
Sample output
3 rows: Bengaluru saree 44000 first
pd-top-n.pyneeds: pandas
Output
Press "Run code" to execute.
