I have timestamp dataset which is in format of
And I have written a udf in pyspark to process this dataset and return as Map of key values. But am getting below err
Mariusz answer didn't really help me. So if you like me found this because it's the only result on google and you're new to pyspark (and spark in general), here's what worked for me.
In my case I was getting that error because I was trying to execute pyspark code before the pyspark environment had been set up.
Making sure that pyspark was available and set up before doing calls dependent on pyspark.sql.functions
fixed the issue for me.