![]() Question 4: which keys in the mapping map to people with a first name of "Gary"? Answer with a Python list. Question 3: what are the values in the mapping associated with keys beginning with tt7 Answer with a Python list. Do not call get mapping a second time (that would be inneficient). Question 2: what is the value associated with the key tt0313542"? Use the dictionary returned earlier. Question 1: what is returned by your get mapping( "smal1 mapping.csv) function? In addition to displaying the result in the out area, keep the result in a variable for use in subsequent questions. The following questions pertain to smal1 mapping.csv unless otherwise specified. O GitHub, Inc (US) "nm0752751": "Mitchell Ryan "tt0093489": "Lethal Weapon", tt0313542" "Runaway Jury Note that the mapping files DO NOT have a CSV header. Do not call get, mapping a second time (that would be inneficient). Question 2: what is the value associated with the key "tt0313542"7 Use the dictionary returned earlier. OGitHub, Inc (US) Should print this "nm9000131" "John Cusack", nm0000154": "Mel Gibson" "nm00ee163": "Dustin Hoffman, "nm8000418" "Danny Glover" nm0008432 "Gene Hackman", nme000997" "Gary Busey" nmee01149": "Richard Donner", nm0001219": "Gary Fleder" "nm8752751": "Mitchell Ryan" tte093469": "Lethal Weapon" tt8313542": "Runaway Jury" Note that the mapping files DO NOT have a CSV header The following questions pertain to small_mapping.csv unless otherwise specified Question 1: what is returned by your get mapping("small mapping.csv") function? In addition to displaying the result in the out (N] area, keep the result in a variable for use in subsequent questions. For example, this code mapping get mapping("small mapping.csv") print (mapping) Should print this: The function should return a dictionary that maps IDs (as keys) to names (as values), based on the file referenced by path. get movies(movies path, mapping, path): this uses the other two functions to load movie data, then replace IDs with names Start by writing a function that starts like this: def get mapping(path): When called, the path should refer to one of the mapping files (eg. Thumbs up iPhone Soft Case By Moni3572 17.15 thumbs up meme Samsung Galaxy Soft Case By memegarage 20.00 Thumbs Up Sign Like Thumbs Up Yes iPhone Soft Case By MKMemo1111 20.00 Gary Busey iPhone Soft Case By Erik Johnson 17.15 PSA Bo iPhone Soft Case By laurynnicole 22.87 Thumbs Up iPhone Soft Case By sweetsixty 19. get raw movies(path) : this loads movie data with info represented using IDs 3. get mapping(path): this loads a file that can be ued to lookup names from IDs 2. We'll develop and test three functions that will be helpful in stage 2 1. Transcribed image text: O Gitlub Inc.(US https/tylerharter/es301-projects/olob/mastehspring 9/8/stage1.md Stage 1: Data Plumbing A lot of data science work often involves plumbing, the process of getting messy data into a more useful format.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |