The purpose of guides is to give an overview of the approach a learner could take to complete the project. It should also detail information and hints at a step-by-step level. As a rule of thumb, we recommend having one step for each major task that learners are required to perform in order to complete the project.
As an example, if the goal of a project is to convert string columns to numeric in a pandas DataFrame and visual the relationship between variables, a guide could show that the following steps can be used to complete the project:
Remove whitespace and convert text to lowercase
Map string values to numbers
Convert to integer data type
Create a scatter plot comparing two features
Each of these bullet points would then be displayed as a step, with further detail provided, for example:
Remove whitespace and convert text to lowercase
You can use the pandas Series
str.strip()
method to remove whitespace from values in a column.The pandas Series
str.lower()`
method allows you to convert text to lowercase.
Map string values to numbers
To map values in a Series you can start by creating a dictionary containing the current values as keys, and values you want to replace them with as values.
The pandas Series
.map()
method accepts a dictionary, replacing key values with the dictionary’s values.
For an example of a Guide, please see this project.