Created
December 15, 2019 21:45
-
-
Save Perishleaf/9c8c7ba59a32c570c848d4c4feb04e6c to your computer and use it in GitHub Desktop.
List the top 20 suburbs with the most number of venues
This file contains 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
sydney_venues_num = sydney_venues.groupby('Suburb').count() | |
sydney_venues_num = sydney_venues_num.drop(columns=['Suburb Latitude', 'Suburb Longitude', 'Venue Latitude', 'Venue Longitude', 'Venue Category']) | |
sydney_venues_num = sydney_venues_num.sort_values(['Venue'], ascending=False).reset_index(drop=False) | |
sydney_venues_num['Suburb'] = sydney_venues_num['Suburb'].str.title() | |
print(sydney_venues_num.shape[0]) | |
sydney_venues_num.head(20) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment