on 04-11-2022 09:00 AM
In this recipe, you'll learn how to convert Spark DataFrame into R DataFrame. Use collect() to collect the data from Spark DataFrame to R DataFrame.
# collect the data from Spark to local
# convert Spark DataFrame into R data frame
local_df_r <- collect(df)
display(local_df_r)