PySpark error: AttributeError: 'NoneType' object has no attribute '_jvm'

前端 未结 5 1997
既然无缘
既然无缘 2020-12-06 10:33

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

5条回答
  •  [愿得一人]
    2020-12-06 10:52

    Just to be clear the problem a lot of guys are having is stemming from a single bad programming style. That is from blah import *

    When you guys do

    from pyspark.sql.functions import *
    

    you overwrite a lot of python builtins functions. I strongly recommending importing functions like

    import pyspark.sql.functions as f
    # or 
    import pyspark.sql.functions as pyf
    

提交回复
热议问题