Challenge: Write a Readable Pipeline
You have learned how to use pipes to streamline your data manipulation code and how best practices like clear formatting and comments can make pipelines much easier to read and maintain. Now, you will put these skills to the test by refactoring a messy and hard-to-follow pipeline into a clean, well-documented sequence of operations for a realistic data cleaning scenario. This exercise will challenge you to apply everything you have learned about writing readable, professional pipelines in R.
Swipe to start coding
Refactor the provided messy pipeline so that it is clean, readable, and well-commented for the given customer data cleaning scenario.
- Remove rows where
customer_idis missing. - Trim whitespace from
first_nameandlast_namecolumns. - Filter to keep only rows where
statusis"active". - Create a new column
full_nameby combiningfirst_nameandlast_name. - Arrange the rows by
signup_datein descending order.
Solução
Obrigado pelo seu feedback!
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Incrível!
Completion taxa melhorada para 4.17
Challenge: Write a Readable Pipeline
Deslize para mostrar o menu
You have learned how to use pipes to streamline your data manipulation code and how best practices like clear formatting and comments can make pipelines much easier to read and maintain. Now, you will put these skills to the test by refactoring a messy and hard-to-follow pipeline into a clean, well-documented sequence of operations for a realistic data cleaning scenario. This exercise will challenge you to apply everything you have learned about writing readable, professional pipelines in R.
Swipe to start coding
Refactor the provided messy pipeline so that it is clean, readable, and well-commented for the given customer data cleaning scenario.
- Remove rows where
customer_idis missing. - Trim whitespace from
first_nameandlast_namecolumns. - Filter to keep only rows where
statusis"active". - Create a new column
full_nameby combiningfirst_nameandlast_name. - Arrange the rows by
signup_datein descending order.
Solução
Obrigado pelo seu feedback!
single