Why do I get AttributeError: 'NoneType' object has no attribute 'something'?

前端 未结 10 2020
长情又很酷
长情又很酷 2020-11-21 13:36

I keep getting an error that says

AttributeError: \'NoneType\' object has no attribute \'something\'
10条回答
  •  孤街浪徒
    2020-11-21 14:01

    if we assign something like the below, it will throw error as "AttributeError: 'NoneType' object has no attribute 'show'"

    df1=df.withColumn('newAge',df['Age']).show() 
    

提交回复
热议问题