I'm working with a dataframe from a csv file and I want to drop a certain row. I tried using df2[df2.State != 'INDIA']
, where INDIA is the row I want to drop. Here's an example of the dataframe:
State Total population 10 Gujarat 60383628 11 Haryana 25353081 12 Himachal Pradesh 6856509 13 INDIA 1210193422 14 Jammu & Kashmir 12548926 15 Jharkhand 32966238 16 Karnataka 61130704 17 Kerala 33387677
What am I doing wrong?
Edit: There's no error but the change is not being reflected. It's still the exact same table. That worked @MohitMotwani. Is there any way to keep the index intact? 'INDIA'removed means that the index 13 is removed and hence the index is being displayed as 11, 12, 14, 15. Is this solvable?