Lab 10

Step 1. Import the necessary libraries
In [ ]:

Step 2. Import the dataset from this address.
https://github.com/guipsamora/pandas_exercises/blob/master/04_Apply/Students_Alcohol_Consumption/student-mat.csv

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 captalize 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 captalize Mjob and Fjob.
In [ ]:

Step 9. Create a function called majority that return a boolean value to a new column called legal_drinker
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 [ ]:

Comments

Popular posts from this blog

Lab 3

Lab 2 (Filtering and Sorting)