Re: DataFrame operations
If it does not return a column you expect, then what does this return ? Do you will have 2 columns with the same column name ? On Sun, Dec 20, 2015 at 7:40 PM, Eran Witkon <eranwit...@gmail.com> wrote: > Hi, > > I am a bit confused with dataframe operations. > I have a function which takes a string and returns a string > I want to apply this functions on all rows on a single column in my > dataframe > > I was thinking of the following: > jsonData.withColumn("computedField",computeString(jsonData("hse"))) > > BUT jsonData("hse") return a column not the row data > What am I missing here? > -- Best Regards Jeff Zhang
Re: DataFrame operations
Ptoblem resolved, syntext issue )-: On Mon, 21 Dec 2015 at 06:09 Jeff Zhang <zjf...@gmail.com> wrote: > If it does not return a column you expect, then what does this return ? Do > you will have 2 columns with the same column name ? > > On Sun, Dec 20, 2015 at 7:40 PM, Eran Witkon <eranwit...@gmail.com> wrote: > >> Hi, >> >> I am a bit confused with dataframe operations. >> I have a function which takes a string and returns a string >> I want to apply this functions on all rows on a single column in my >> dataframe >> >> I was thinking of the following: >> jsonData.withColumn("computedField",computeString(jsonData("hse"))) >> >> BUT jsonData("hse") return a column not the row data >> What am I missing here? >> > > > > -- > Best Regards > > Jeff Zhang >
DataFrame operations
Hi, I am a bit confused with dataframe operations. I have a function which takes a string and returns a string I want to apply this functions on all rows on a single column in my dataframe I was thinking of the following: jsonData.withColumn("computedField",computeString(jsonData("hse"))) BUT jsonData("hse") return a column not the row data What am I missing here?