Skip to content

Instantly share code, notes, and snippets.

@joseberlines
Last active February 21, 2021 22:47
Show Gist options
  • Select an option

  • Save joseberlines/299dbcf373ae2e5f4e8f79e3877c4861 to your computer and use it in GitHub Desktop.

Select an option

Save joseberlines/299dbcf373ae2e5f4e8f79e3877c4861 to your computer and use it in GitHub Desktop.
stations_df.loc[stations_df['country'] != 'Germany','classes'] = 'EU'
stations_df['background-color']=''
stations_df.loc[stations_df['country'] == 'Germany','background-color'] = 'blue'
stations_df.loc[stations_df['country'] != 'Germany','background-color'] = 'orange'
stations_df.loc[stations_df['id'] == 'BER','background-color'] = 'yellow'
stations_df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment