Quantcast
Channel: Load CSV data in to Dataframe and convert to Array using Apache Spark (Java) - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Load CSV data in to Dataframe and convert to Array using Apache Spark (Java)

$
0
0

I have a CSV file with below data :

1,2,5  2,4  2,3 

I want to load them into a Dataframe having schema of string of array

The output should be like below.

[1, 2, 5]  [2, 4]  [2, 3] 

This has been answered using scala here:Spark: Convert column of string to an array

I want to make it happen in Java.
Please help


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images