11/22/21, 12:39 PM Reading, Writing & Usernames - Assignment https://dunwoody.instructure.com/courses/7744/assignments/173722?module_item_id= XXXXXXXXXX/2 Reading, Writing & Usernames - Assignment Due...

See attachment for assignment.


11/22/21, 12:39 PM Reading, Writing & Usernames - Assignment https://dunwoody.instructure.com/courses/7744/assignments/173722?module_item_id=283643 1/2 Reading, Writing & Usernames - Assignment Due Oct 8 by 11:59pm Points 50 Submitting a file upload Start Assignment name Gender Eye color Race Hair color Height Publisher Skin color Alignment Weight username 0A-Bomb Male yellow Human No Hair 203 Marvel Comics - good 441A-Bom69241 1Abe Sapien Male blue Icthyo Sapien No Hair 191 Dark Horse Comics blue good 65AbexS87259 2Abin Sur Male blue Ungaran No Hair 185DC Comics red good 90Abinx36827 3Abomination Male green Human / Radiation No Hair 203 Marvel Comics - bad 441Abomi10020 4Abraxas Male blue Cosmic Entity Black -99 Marvel Comics - bad -99Abrax38558 You are working in a new startup with brand new employees, who happen to be superheroes. You have been asked to create a username that is unique for each user of your new systems. At least part of the user's name is to be incorporated into the user's username. For instance, at Dunwoody, your instructor is Simlea. She is the only one with a username of Simlea. Kaggle.com is a great place to get datasets. Here is a dataset for superheroes: https://www.kaggle.com/claudiodavi/superhero-set?select=heroes_information.csv (https://www.kaggle.com/claudiodavi/superhero-set?select=heroes_information.csv) The assignment is to take this source document, and 1) read the file using Python, and 2) write the file's data to a second file using Python. You should add an additional column to this second file that you will populate with a unique username for the user. In other words, you will extract data from the first file, transform it by way of a new added username, and then load it into another file. The extract-transform- load (ETL) type of process is common, usually working with databases, but we are working with files. Be sure to add a header row at the top, that includes your new username column. There are many ways to do this. Here is the output of a candidate solution that will be shared with you at some point. It is using the modules csv and random. Pandas and its dataframes is a good option too. practice_ETL.py posted to week 5 on our page will get you started. It uses csv.reader. The solution below also uses csv.reader, and also csv.writer. https://www.kaggle.com/claudiodavi/superhero-set?select=heroes_information.csv 11/22/21, 12:39 PM Reading, Writing & Usernames - Assignment https://dunwoody.instructure.com/courses/7744/assignments/173722?module_item_id=283643 2/2 5Absorbing Man Male blue Human No Hair 193Marvel Comics - bad 122Absor37455 Extra credit (10 points): Check for Duplicate Usernames Write a program that checks for duplicate usernames. Demonstrate how it will catch duplicates if they are there. There are many ways to do this. A candidate solution will be shared with you at some point. The candidate solution uses a set() to determine if duplicates existed. Running your test against gender or eye color can be helpful in testing. For instance, the solution outputs duplicates for these columns, but not for the usernames, because they are unique. ... duplicate eye color for: 625 duplicate eye color for: 626 duplicate eye color for: 627 duplicate eye color for: 628 ...
Nov 22, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here