Skip to content

Instantly share code, notes, and snippets.

@rian-dolphin
Created May 27, 2022 13:16
Show Gist options
  • Save rian-dolphin/94a3cf9f09cedb857b23b52153048a80 to your computer and use it in GitHub Desktop.
Save rian-dolphin/94a3cf9f09cedb857b23b52153048a80 to your computer and use it in GitHub Desktop.
# -- Read in the data
df = px.data.gapminder()
# -- Apply the year filter given by the user
filtered_df = df[(df.year == year_choice)]
# -- Apply the continent filter
if continent_choice != "All":
filtered_df = filtered_df[filtered_df.continent == continent_choice]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment