4.1. Exercises

Name That type/dtype

Dataframe and Series True and False

Dtype Practice

Instructions:
Running a coding exercise for the first time could take a bit of time for everything to load. Be patient, it could take a few minutes.

When you see ____ in a coding exercise, replace it with what you assume to be the correct code. Run it and see if you obtain the desired output. Submit your code to validate if you were correct.

Remember our canucks dataframe? Let’s take a closer look at the labels of the columns.

Player No. Age Height Weight Country Position Experience Birth Date Salary


Question 1 (a)

Question 1 (b)

Use the coding cell below to check the dtype for the Salary column.

Hint 1
  • Are you using the attribute dtypes?
Fully worked solution:

Question 1 (c)

Question 2 (a)

Question 2 (b)

Use the coding cell below to check the dtype for the Weight column.

Hint 1
  • Are you using the attribute dtypes?
Fully worked solution:

Question 2 (c)