Path: blob/master/10_Deleting/Iris/Exercises.ipynb
613 views
Kernel: Python 2
Iris
Introduction:
This exercise may seem a little bit strange, but keep doing it.
Step 1. Import the necessary libraries
In [ ]:
Step 2. Import the dataset from this address.
Step 3. Assign it to a variable called iris
In [ ]:
Step 4. Create columns for the dataset
In [57]:
Step 5. Is there any missing value in the dataframe?
In [ ]:
Step 6. Lets set the values of the rows 10 to 29 of the column 'petal_length' to NaN
In [ ]:
Step 7. Good, now lets substitute the NaN values to 1.0
In [ ]:
Step 8. Now let's delete the column class
In [ ]:
Step 9. Set the first 3 rows as NaN
In [ ]:
Step 10. Delete the rows that have NaN
In [ ]:
Step 11. Reset the index so it begins with 0 again
In [ ]:
BONUS: Create your own question and answer it.
In [ ]: