import pandas as pd df = pd.DataFrame({ "Student": ['John', 'Jennifer', 'Jeff', 'Joshua', 'Jack', 'Jeremy', 'Jason'], "Score": [95, 100, 94, 99, 88, 92, 89] }) df.nlargest(3, "Score") df.nsmallest(3, "Score")
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter