-1

covid_case_DataFrame

I have this pandas DataFrame in Python which contains covid-19 cases of all states in India at particular date . Now from this DataFrame I want to remove all those rows in which status is equal to Recovered and Deceased.

In other terms, I only want confirmed cases . So how can I do that ?

PATHIK GHUGARE
  • 137
  • 1
  • 9

2 Answers2

0

You want

dataset = dataset[dataset.Status == "Confirmed"]
Balaji Ambresh
  • 4,977
  • 2
  • 5
  • 17
0

Try this:

df = df[df['Status']=='Confirmed']
NYC Coder
  • 7,424
  • 2
  • 11
  • 24