city_df["Geography"].str.endswith("Quebec")
This is my code which gives me list of True and False. I want get all the names of cities that are set to True.
city_df["Geography"].str.endswith("Quebec")
This is my code which gives me list of True and False. I want get all the names of cities that are set to True.
you are almost there.
mask = city_df["Geography"].str.endswith("Quebec")
quebec_city = city_df[mask]
provide a more complete example may be helpful.