Standardizing Meeting Day Preferences
The scheduling tool allows club officers to submit their weekly preferred meeting day through an unvalidated free-text form field. As a result, identical intended days are recorded with differing cases, abbreviations, and trailing spaces.
Before calculating preference totals, a cleaning script must normalize entries into standard labels: “Monday”, “Tuesday”, “Wednesday”, or “Thursday” without altering user intent or dropping valid responses.
| Student ID | Raw Input | Intended Category |
|---|---|---|
| S-21 | mon | Monday |
| S-22 | Tues | Tuesday |
| S-23 | WEDNESDAY | Wednesday |
| S-24 | thurs | Thursday |
Which sequence of operations correctly normalizes the raw inputs into their standard category names?
Filter the dataset by removing any entry whose length is not equal to the length of the standard day name, then capitalize the first character.
Count the total occurrences of each unique raw string, select the most frequently submitted string, and overwrite all other submissions with that string.
Strip leading and trailing whitespace, convert all letters to lowercase, match the first three characters to a lookup table of standard day names, and replace the input with the corresponding full day name.
Convert all letters to uppercase, remove all vowels from each string, and append the suffix “DAY” to every entry.
Question Leaderboard
Not enough data yet to show leaderboard.
