spark-examples/pyspark-examples

AttributeError: 'NoneType' object has no attribute 'rdd'

pgalimutti opened this issue · 1 comments

Line # 39
keysDF = df.select(explode(map_keys(df.properties))).distinct().show()
throws below error:

AttributeError Traceback (most recent call last)
in
----> 1 keysList = keysDF.rdd.map(lambda x:x[0]).collect()

AttributeError: 'NoneType' object has no attribute 'rdd'

please ignore, as I added show() at the end of preceeding line of code.