Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
pp:project2021 [2022/05/11 11:09] vbadoiu |
pp:project2021 [2022/05/11 18:45] (current) dmihai [3.6 Typos (1p)] |
||
---|---|---|---|
Line 402: | Line 402: | ||
Your job is to fix the typos in ''email_map'' table, generate the correct table and then use that to join the information about user’s stats. | Your job is to fix the typos in ''email_map'' table, generate the correct table and then use that to join the information about user’s stats. | ||
- | ==== 3.6 Typos (1p) ==== | + | ==== 3.6 Typos (0.4p) ==== |
Column ''Name'' from table ''email_map'' contains typos. Example: //Zane Kayle// is misspelled as //Zan Kayle// or //Amelia Caden// is misspelled as //Amelia Camdden//. Fortunately, the name //Zane Kayle// contains only a few misspelled letters and it is guaranteed to appear in the correct form, in the name column of the ''8h sleep'' or ''physical_activity_in_a_day'' tables. Hence, we can use the latter names as **reference** to correct the typos. | Column ''Name'' from table ''email_map'' contains typos. Example: //Zane Kayle// is misspelled as //Zan Kayle// or //Amelia Caden// is misspelled as //Amelia Camdden//. Fortunately, the name //Zane Kayle// contains only a few misspelled letters and it is guaranteed to appear in the correct form, in the name column of the ''8h sleep'' or ''physical_activity_in_a_day'' tables. Hence, we can use the latter names as **reference** to correct the typos. | ||
Line 410: | Line 410: | ||
<code haskell> | <code haskell> | ||
- | correct_table :: String -> CSV -> CSV -> CSV | + | correct_table :: String -> Table -> Table -> Table |
- | -- this will be tested using: correct_table "Nume" email_map_csv hw_grades_csv | + | -- this will be tested using: correct_table "Nume" emails physical_activity |
</code> | </code> | ||