<How can I delete a row from a Pandas dataframe ba...
# community-feeds
r
How can I delete a row from a Pandas dataframe based on user input of the row's index? I'm trying to remove a row from a dataframe, but instead of specifying the index i want the user to be able to input the row's index, and then it deletes the row based on that value rowdel = input("enter row # to delete") df.drop([rowdel], axis=0, inplace=True) This is my code, but i get the error "['x'] not found in axis" (x being the input)