java - Convert String containing letters to Int efficiently - Apache Spark -
i working dataset has users strings (ie. b000gkxy4s). convert each of these users int, can use rating(user: int, product: int, rating: double) class in apache spark als. efficient way this? preferably using spark scala functions or python native functions.
if want matchable string int - string.hashcode()
. have deal possible hash collisions. alternatively you'd have convert each character int value , append (not add) of these together.
Comments
Post a Comment