Skip to content

Commit

Permalink
Update update_tournaments.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ianfab authored Jan 24, 2024
1 parent a2bbec2 commit 6703ebc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _scripts/update_tournaments.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def prettify_location(locations):
# strip zip code from city
locations.replace(to_replace=r'\d{4,6}|\d+\-\d+', value=r'', regex=True, inplace=True)
# clean up by removing redundance and consolidating whitespacing
return locations.apply(lambda x: ", ".join(dict.fromkeys(s.strip() for s in (x or '').split(',') if s.strip())))
return locations.apply(lambda x: ", ".join(dict.fromkeys(s.strip() for s in str(x or '-').split(',') if s.strip())))


if __name__ == '__main__':
Expand Down

0 comments on commit 6703ebc

Please sign in to comment.