Hi,
I have this
val weights = Array(("a", 3), ("b", 2), ("c", 5), ("d", 1), ("e", 9), ("f", 4),
("g", 6))
weights.toDF("weights","value")
I want to convert the Array to DF but I get thisor
weights: Array[(String, Int)] = Array((a,3), (b,2), (c,5), (d,1), (e,9), (f,4),
(g,6))
<console>:33: error: value toDF is not a member of Array[(String, Int)]
weights.toDF("weights","value")
I want to label columns and print out the contents in value order please I
don't know why I am getting this error
Thanks
- Converting array to DF Ashok Kumar
- Re: Converting array to DF Jeff Zhang
- Re: Converting array to DF Ashok Kumar
- Re: Converting array to DF Shixiong(Ryan) Zhu
- Re: Converting array to DF Ashok Kumar
- RE: Converting array to DF Mao, Wei
