Skip to content

Commit

Permalink
resolve merge
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomaht committed Dec 18, 2023
2 parents 3adf5f3 + 6b49c07 commit 538c048
Show file tree
Hide file tree
Showing 3 changed files with 686 additions and 686 deletions.
2 changes: 1 addition & 1 deletion data/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
merged_df = pd.merge(city_pics_df, data_swiss_city_df, left_on=city_pics_df.columns[0], right_on='Ortschaftsname')

# Rename columns and drop unnecessary ones
merged_df = merged_df.rename(columns={0: 'City', 1: 'Img link', 2: 'Img link 2', 'Kantonskürzel': 'Canton', 'Sprache': 'Language'}).drop(['Img link 2', 'Ortschaftsname', 'Zusatzziffer', 'Gemeindename', 'BFS-Nr', 'PLZ'], axis=1)
merged_df = merged_df.rename(columns={0: 'City', 1: 'Img_link', 'Kantonskürzel': 'Canton', 'Sprache': 'Language'}).drop(['Ortschaftsname', 'Zusatzziffer', 'Gemeindename', 'BFS-Nr', 'PLZ'], axis=1)

# Keep only the first occurrence of each city
merged_df = merged_df.drop_duplicates(subset='City', keep='first')
Expand Down
Loading

0 comments on commit 538c048

Please sign in to comment.