Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
guipsamora
GitHub Repository: guipsamora/pandas_exercises
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

Step 2. Import the dataset from this address.

Step 3. Assign it to a variable called df.

Step 4. For the purpose of this exercise slice the dataframe from 'school' until the 'guardian' column

Step 5. Create a lambda function that will capitalize strings.

Step 6. Capitalize both Mjob and Fjob

Step 7. Print the last elements of the data set.

Step 8. Did you notice the original dataframe is still lowercase? Why is that? Fix it and capitalize Mjob and Fjob.

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)

Step 10. Multiply every number of the dataset by 10.

I know this makes no sense, don't forget it is just an exercise