Hello, In my previous post I have explained different spark interview questions. In this Post I am explaining about easy ways to create dataframes in Spark. In this Video I am explaining how to create Dataframes in different ways.
Usually four ways to create a dataframes, but use DataFrame API is the best and easy way to create a dataframe.
1) use DataFrame API
2) Programmatically Specifying Schema
3) Use Case Classes
4) use toDF
If you want scriipt/code, just mail me at firstname.lastname@example.org