Guest User

Untitled

a guest
Sep 21st, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. [(1008044337136001024, 0.9343283582089552), (1008044334510428160, 3.103463393248575), (1008044334413852677, 0.7622047244094489), (1008044333260509185, 0.493006993006993), (1008044331641593856, 1.6094069529652353), (1008044329062092801, 0.481981981981982), (1008044326675460096, 1.3606889564336373), (1008044325710782469, 0.7228464419475655), (1008044323370295296, 0.46547314578005117), (1008044320757354497, 353.8944618599791)]
  2.  
  3. Social_Context_MAX = Social_Context.map(lambda x : x[1]).max()
  4. print Social_Context_MAX
  5.  
  6. TypeError: 'float' object has no attribute '__getitem__'
  7.  
  8. Social_Context_MAX = Social_Context.toDF(["id", "value"])
  9. print Social_Context_MAX.agg({"value": "max"}).collect()[0][0]
  10.  
  11. raise TypeError("Unexpected obj type: %s" % type(obj))
  12. TypeError: Unexpected obj type: <type 'float'>
Add Comment
Please, Sign In to add comment