Created
April 24, 2020 10:34
-
-
Save ShayanRiyaz/f311307236b8c69556c8315abd96b08f to your computer and use it in GitHub Desktop.
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
clus1neigh=la_merged.loc[la_merged['Cluster Label'] == 1, la_merged.columns[0]].values.tolist() | |
filtered_nhoods=nhoods.copy() | |
for i in range(0,len(filtered_nhoods)): | |
if filtered_nhoods.iloc[i,0] not in clus1neigh: | |
filtered_nhoods.iloc[i,0]='TO DROP' | |
filtered_nhoods=filtered_nhoods[filtered_nhoods.Neighbourhood!='TO DROP'] | |
filtered_nhoods.reset_index(drop=True,inplace=True) | |
filtered_nhoods |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment