Path: blob/master/04_Apply/Students_Alcohol_Consumption/Exercises.ipynb
548 views
Kernel: Python [default]
Student Alcohol Consumption
Introduction:
This time you will download a dataset from the UCI.
Step 1. Import the necessary libraries
In [ ]:
Step 2. Import the dataset from this address.
Step 3. Assign it to a variable called df.
In [ ]:
Step 4. For the purpose of this exercise slice the dataframe from 'school' until the 'guardian' column
In [ ]:
Step 5. Create a lambda function that will capitalize strings.
In [ ]:
Step 6. Capitalize both Mjob and Fjob
In [ ]:
Step 7. Print the last elements of the data set.
In [ ]:
Step 8. Did you notice the original dataframe is still lowercase? Why is that? Fix it and capitalize Mjob and Fjob.
In [ ]:
Step 9. Create a function called majority that returns a boolean value to a new column called legal_drinker (Consider majority as older than 17 years old)
In [ ]:
In [ ]:
Step 10. Multiply every number of the dataset by 10.
I know this makes no sense, don't forget it is just an exercise
In [ ]:
In [ ]: