#!/usr/bin/env python # coding: utf-8 # # 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](https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data). # ### Step 3. Assign it to a variable called iris # In[ ]: # ### Step 4. Create columns for the dataset # In[57]: # 1. sepal_length (in cm) # 2. sepal_width (in cm) # 3. petal_length (in cm) # 4. petal_width (in cm) # 5. class # ### 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[ ]: