Guest User

Untitled

a guest
Mar 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. def createLabeledPoints(fields):
  2. q1 = int(fields[0])
  3. q2 = int(fields[1])
  4. result = int(fields[38])
  5. return LabeledPoint(result, array([q1, q2, q3))
  6.  
  7. from pymongo import MongoClient
  8. client = MongoClient('localhost', 27017)
  9. db1 = client.newumc
  10. collection1 = db.data_classification
  11. rawData1 = DataFrame(list(collection.find({})))
  12.  
  13. field_for_test = collection.find({}, {'field_from_mongodb':1,'_id':0})
Add Comment
Please, Sign In to add comment