Pivot in Pyspark and custom sort
I’m trying to pivot some data from a data frame in an specific order (hours in rows and months in columns). It works but I can’t sort correctly months. I’m not sure if it’s because I extract first the month in number from a column in timestamp format and the convert to string from month in number with a when function I attach the output and the desired one. Thank you