Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def createLabeledPoints(fields):
- q1 = int(fields[0])
- q2 = int(fields[1])
- result = int(fields[38])
- return LabeledPoint(result, array([q1, q2, q3))
- from pymongo import MongoClient
- client = MongoClient('localhost', 27017)
- db1 = client.newumc
- collection1 = db.data_classification
- rawData1 = DataFrame(list(collection.find({})))
- field_for_test = collection.find({}, {'field_from_mongodb':1,'_id':0})
Add Comment
Please, Sign In to add comment