DataSet transformation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

DataSet transformation

Lydia Ickler
Hi all,

so I have a case class Spectrum(mz: Float, intensity: Float)
and a DataSet[Spectrum] to read my data in.

Now I want to know if there is a smart way to transform my DataSet into a two dimensional Array ?

Thanks in advance,
Lydia

Reply | Threaded
Open this post in threaded view
|

Re: DataSet transformation

rmetzger0
Hi,

for that you have to collect the dataset to your local machine and then transform the collection into the array.
Note that this only advised for small data sets.

Robert



On Thu, Oct 1, 2015 at 2:13 PM, Lydia Ickler <[hidden email]> wrote:
Hi all,

so I have a case class Spectrum(mz: Float, intensity: Float)
and a DataSet[Spectrum] to read my data in.

Now I want to know if there is a smart way to transform my DataSet into a two dimensional Array ?

Thanks in advance,
Lydia