SHARE
TWEET

Untitled

a guest Oct 26th, 2016 160 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. val functionSome = udf((someName: String) => {
  2.     otherDF.filter(otherDF("name") === someName).count
  3. })
  4.  
  5. someDF = someDF.withColumn("newColumn", functionSome(someDF("someName")))
  6.  
  7. someDF.show()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top