Created
May 25, 2021 09:43
-
-
Save ericgitonga/76c101319e5e95ba057e50b677dba76d to your computer and use it in GitHub Desktop.
Code to see determine which items in place had only one entry
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
place = df['Location'].apply(lambda x: x.split(', ')) | |
stateless = [] | |
for i in range(len(place)): | |
if len(place.loc[i]) == 1: | |
place.loc[i].append(np.nan) | |
stateless.append(place[i][0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment