Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pivot pyspark

dff = mydf.groupBy('id').pivot('day').agg(F.first('price').alias('price'),F.first('units').alias('unit'))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pivot #pyspark
ADD COMMENT
Topic
Name
3+5 =