I have a dataframe relating to Olympic sports, along with the Nations competing and number/ranking of medals won, etc. My list of sports includes both summer and winter games sports, and I want to create a new dataframe showing just the summer sports.
So, I have a list of the rows I want to remove from the column "Sport", including things like "luge", "speed skating", "curling" etc. There are a lot of items in this list and I have tried various approaches to the drop() function using axis=0, but I can't find a way to cut these rows ( I'm getting errors along the lines of two many arguments etc)
Any advice would be gratefully received!
I have tried various approaches, including:
newdf=df.drop("luge", "curling", "speed skating", "skeleton bob", "ski jump", "cross country skiing", "bobsleigh", axis = 0, inplace=True)
And:
newdf=df.drop(["sport":"luge", "curling", "speed skating", "skeleton bob", "ski jump", "cross country skiing", "bobsleigh"], axis = 0, inplace=True)