Advertisements
Advertisements
प्रश्न
Consider the given DataFrame 'health'.
| Diseasename | Agent | |
| 0 | Common cold | Virus |
| 1 | Chickenpox | Virus |
| 2 | Cholera | Bacteria |
| 3 | Tuberculosis | Bacteria |
Write suitable Python statements for the following:
- Remove the row containing details of disease named Tuberculosis.
- Add a new disease named 'Malaria' caused by 'Protozoa'.
- Display the last 2 rows.
कोड लेखन
Advertisements
उत्तर
-
health.drop(3) -
health.loc[4] = ['maleria','Protozoa'] -
health.iloc[2:]
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
