Hello ayan, Same key will not exists in different lists. Which means, If "1" exists in a list, then it will not be presented in another list.
Thank you. On Thu, Mar 30, 2017 at 3:56 PM, ayan guha <[email protected]> wrote: > Is it possible for one key in 2 groups in rdd2? > > [1,2,3] > [1,4,5] > > ? > > On Thu, 30 Mar 2017 at 12:23 pm, Mungeol Heo <[email protected]> wrote: >> >> Hello Yong, >> >> First of all, thank your attention. >> Note that the values of elements, which have values at RDD/DF1, in the >> same list will be always same. >> Therefore, the "1" and "3", which from RDD/DF 1, will always have the >> same value which is "a". >> >> The goal here is assigning same value to elements of the list which >> does not exist in RDD/DF 1. >> So, all the elements in the same list can have same value. >> >> Or, the final RDD/DF also can be like this, >> >> [1, 2, 3], a >> [4, 5], b >> >> Thank you again. >> >> - Mungeol >> >> >> On Wed, Mar 29, 2017 at 9:03 PM, Yong Zhang <[email protected]> wrote: >> > What is the desired result for >> > >> > >> > RDD/DF 1 >> > >> > 1, a >> > 3, c >> > 5, b >> > >> > RDD/DF 2 >> > >> > [1, 2, 3] >> > [4, 5] >> > >> > >> > Yong >> > >> > ________________________________ >> > From: Mungeol Heo <[email protected]> >> > Sent: Wednesday, March 29, 2017 5:37 AM >> > To: [email protected] >> > Subject: Need help for RDD/DF transformation. >> > >> > Hello, >> > >> > Suppose, I have two RDD or data frame like addressed below. >> > >> > RDD/DF 1 >> > >> > 1, a >> > 3, a >> > 5, b >> > >> > RDD/DF 2 >> > >> > [1, 2, 3] >> > [4, 5] >> > >> > I need to create a new RDD/DF like below from RDD/DF 1 and 2. >> > >> > 1, a >> > 2, a >> > 3, a >> > 4, b >> > 5, b >> > >> > Is there an efficient way to do this? >> > Any help will be great. >> > >> > Thank you. >> > >> > --------------------------------------------------------------------- >> > To unsubscribe e-mail: [email protected] >> > >> >> --------------------------------------------------------------------- >> To unsubscribe e-mail: [email protected] >> > -- > Best Regards, > Ayan Guha --------------------------------------------------------------------- To unsubscribe e-mail: [email protected]
