how to use spark map with .net for spark

how to use spark map with .net for spark? like in python:

nums=sc.parallelize([1,2,3,4]) x: x*x).collect); 

in scale:

val input=sc.parallelize([1,2,3,4]) val>x*x) 

but .net dataframe doesn’t has a funtion named map

this document( hasn’t demo.

Add Comment
1 Answer(s)

The map function belongs to the RDD API, while the .Net implements the Dataframe API (aka Spark SQL). You need to use correct functions, like, Select to transform data. So, if you get your data into the dataframe df, then you can do something like in your map with df.Select(df["col"]*df["col"]), etc.

See the examples in the Spark.Net repo.

Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.