Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

spark df to pandas df

some_df = sc.parallelize([
 ("A", "no"),
 ("B", "yes"),
 ("B", "yes"),
 ("B", "no")]
 ).toDF(["user_id", "phone_number"])
pandas_df = some_df.toPandas()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #spark #df #pandas #df
ADD COMMENT
Topic
Name
2+6 =