Created
October 9, 2017 09:59
-
-
Save chankeypathak/f2c030a6c4afc9c63e17b3218edb6fa5 to your computer and use it in GitHub Desktop.
Get top 10 student names
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
df = pd.read_csv(r'data.csv', encoding='utf8') | |
df['score'] = df['score'].str.replace('%', '') | |
score_df = (df['score'].sort_values(ascending=False)[:5]) | |
indexes = score_df.index | |
print (df.iloc[indexes]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment