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.
Solución
¡Gracias por tus comentarios!
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Genial!
Completion tasa mejorada a 4.17
Challenge: Write a Readable Pipeline
Desliza para mostrar el menú
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.
Solución
¡Gracias por tus comentarios!
single