I know how to delete rows and columns from a dataframe using .drop()
method, by passing axis and labels.
Here's the Dataframe:
Now, if i want to remove all rows whose STNAME
is equal to from (Arizona
all the way to Colorado
), how should i do it ?
I know i could just do it by passing row labels 2 to 7 to .drop()
method but if i have a lot of data and i don't know the starting and ending indexes, it won't be possible.