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.
Soluzione
Grazie per i tuoi commenti!
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Fantastico!
Completion tasso migliorato a 4.17
Challenge: Write a Readable Pipeline
Scorri per mostrare il 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.
Soluzione
Grazie per i tuoi commenti!
single