Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JohnDeJesus22/658b2b02f80fb04c310219b7b06833a7 to your computer and use it in GitHub Desktop.
Save JohnDeJesus22/658b2b02f80fb04c310219b7b06833a7 to your computer and use it in GitHub Desktop.
Medium web scrap p5
# Search for sum of duplicate
print(df.duplicated(['Teacher_Names']).sum())
# Eliminating duplicates
df.drop_duplicates(['Teacher_Names'], keep='first', inplace=True)
# Export to csv without numbered indices
df.to_csv('BronxSchoolStaffInfo.csv', index=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment