Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import pickle
  4. import sys
  5. import matplotlib.pyplot
  6. sys.path.append("../tools/")
  7. from feature_format import featureFormat, targetFeatureSplit
  8.  
  9.  
  10. ### read in data dictionary, convert to numpy array
  11. data_dict = pickle.load( open("../final_project/final_project_dataset.pkl", "r") )
  12. features = ["salary", "bonus"]
  13. data = featureFormat(data_dict, features)
  14.  
  15.  
  16. ### your code below
  17. print data.max()
  18. for point in data:
  19. salary = point[0]
  20. bonus = point[1]
  21. matplotlib.pyplot.scatter( salary, bonus )
  22.  
  23. matplotlib.pyplot.xlabel("salary")
  24. matplotlib.pyplot.ylabel("bonus")
  25. matplotlib.pyplot.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement