Screen Link:
This is the mission in DQ:
The recent_grads
dataset has been loaded in. It turns out that the major_code
column is formatted incorrectly and actually has leading zeroes. For example, the number “2419” should actually be “0002419”.
DQ’s example to follow is:
str_pad(“Dataquest”, width = 20, side = “both”, pad = " ")
" Dataquest "
DQ’s answer to mission :
recent_grads ← recent_grads >
mutate(
formatted_major_code = str_pad(major_code, 7, pad = “0”)
)
My query:
Why does DQ’s answer doesn’t include ‘left’ , as the padding is to be done on left of the numbers in the column ‘major_code’