Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.02 KB | None | 0 0
  1. #Film column has a bunch of NaN that needs fixes, either value isn't there or dosen't apply
  2. #If film dosen't apply then we just put ***** because that is better then NaN
  3.  
  4. #The Sky Hawk - Ralph Hammeras
  5. data.loc[(data.Award == 'Engineering Effects') & (data.Name == 'Ralph Hammeras'), 'Film'] = 'The Sky Hawk'
  6. #The Jazz Singer - Nugent Slaughter
  7. data.loc[(data.Award == 'Engineering Effects') & (data.Name == 'Nugent Slaughter'), 'Film'] = 'The Jazz Singer'
  8.  
  9. #The Red Mill - Joseph Farnham
  10. data.loc[(data.Award == 'Writing (Title Writing)') & (data.Name == 'Joseph Farnham'), 'Film'] = 'The Red Mill'
  11. #The Magic Flame - George Marion, Jr.
  12. data.loc[(data.Award == 'Writing (Title Writing)') & (data.Name == 'George Marion, Jr.'), 'Film'] = 'The Magic Flame'
  13.  
  14. #Honorary Award dosent alwats have a film so we just put *****
  15. data.loc[(data.Award == 'Honorary Award') & (data['Film'].isnull()), 'Film'] = '*****'
  16.  
  17. #For 2 years for some reason there wasnt specifc movie that these studios or persons are nominated for
  18. data.loc[(data.Award == 'Sound Recording') & (data['Film'].isnull()), 'Film'] = '*****'
  19.  
  20. #First year Assistant Director award was given few studios gave their best Assistant Director and
  21. #the moive isn't declered so this award dosn't really make sence. ***** it is for now
  22. data.loc[(data.Award == 'Assistant Director') & (data['Film'].isnull()), 'Film'] = '*****'
  23.  
  24. #Special award is the same as Honorary Award. So *****
  25. data.loc[(data.Award == 'Special Award') & (data['Film'].isnull()), 'Film'] = '*****'
  26.  
  27. #Irving G. Thalberg Memorial Award is an honorary Award, so *****
  28. data.loc[(data.Award == 'Irving G. Thalberg Memorial Award') & (data['Film'].isnull()), 'Film'] = '*****'
  29.  
  30. #Special Foreign Language Film Award is what best Foreign language Film was called before.
  31. #Name and film are swaped later
  32. data.loc[(data.Award == 'Special Foreign Language Film Award') & (data.Name == 'Monsieur Vincent'), 'Film'] = 'France'
  33. data.loc[(data.Award == 'Special Foreign Language Film Award') & (data.Name == 'The Bicycle Thief'), 'Film'] = 'Italy'
  34.  
  35. #Honorary Foreign Language Film Award same as Special Foreign Language Film Award
  36. data.loc[(data.Award == 'Honorary Foreign Language Film Award') & (data.Name == 'The Walls of Malapaga'), 'Film'] = 'France, Italy'
  37. data.loc[(data.Award == 'Honorary Foreign Language Film Award') & (data.Name == 'Rashomon'), 'Film'] = 'Japan'
  38. data.loc[(data.Award == 'Honorary Foreign Language Film Award') & (data.Year == '1952'), 'Name'] = 'Forbidden Games'
  39. data.loc[(data.Award == 'Honorary Foreign Language Film Award') & (data.Name == 'Forbidden Games'), 'Film'] = 'France'
  40. data.loc[(data.Award == 'Honorary Foreign Language Film Award') & (data.Name == 'Gate of Hell'), 'Film'] = 'Japan'
  41. data.loc[(data.Award == 'Honorary Foreign Language Film Award') & (data.Name == 'Samurai, The Legend of Musashi'), 'Film'] = 'Japan'
  42.  
  43. #Jean Hersholt Humanitarian Award should be Honorary Award in our dataset
  44. data.loc[(data.Award == 'Jean Hersholt Humanitarian Award') & (data['Film'].isnull()), 'Film'] = '*****'
  45.  
  46. #Medal of Commendation and John A. Bonner Medal of Commendation Award should just be *****
  47. data.loc[(data.Award == 'Medal of Commendation') & (data['Film'].isnull()), 'Film'] = '*****'
  48. data.loc[(data.Award == 'John A. Bonner Medal of Commendation') & (data['Film'].isnull()), 'Film'] = '*****'
  49. data.loc[(data.Award == 'Award of Commendation') & (data['Film'].isnull()), 'Film'] = '*****'
  50.  
  51. #Gordon E. Sawyer Award is an honoaray award
  52. data.loc[(data.Award == 'Gordon E. Sawyer Award') & (data['Film'].isnull()), 'Film'] = '*****'
  53.  
  54. #Sis Hopkins - The nomination was withdrawn by Republic Studios. It is thus not counted as an official
  55. #Academy nomination and listed here for the purpose of information only. HOW TO DROP THIS???
  56. data = data[(data['Name'] != 'Sis Hopkins')]
  57.  
  58. #Song of the Open Road wasn't nominated for Art Direction but for Music (Original Score)
  59. data.loc[(data.Award == 'Art Direction (Black and White)') & (data.Name == 'Song of the Open Road'), 'Film'] = 'Music (Original Score)'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement