Apache Spark Tutorial for beginners: Create a DataFrame Manually using scala

preview_player
Показать описание
🚀 Learn how to create a DataFrame from a range of numbers or a collection of objects using Apache Spark.

Apache Spark offers two primary methods to create a DataFrame manually.

The toDF functions can turn a scala into a DataFrame.
With the toDF function, we can also transform a list or sequence of objects into a DataFrame.

The spark session also provides the range function that allows us to create a DataFrame from a numerical range.

A more powerful way to create DataFrame manually in Apache Spark is to use the createDataFrame method.

In contrast to the toDF and range function, the createDataFrame function allows us to specify the schema of our DataFrame explicitly
Рекомендации по теме
Комментарии
Автор

Hey Wadson, Your training in udemy is awsome, I have enrolled it, Request you if you could publish same on YT, for the betterment of the community... ~Thnx

thesadanand
Автор

when I am using df1.show() it gives me an Exception i.e. (
ClassCastException: java.lang.Integer cannot be cast to java.lang.Long)
Please solve this issue...

SurajKumar-hboc