爲新手問題道歉。我只是在學習。新手(spark數據框) - df.count()。show()返回AttributeError
我只是試圖從Cloudant數據庫創建一個spark數據框並計算條目數。調用函數計算後,我得到了一個錯誤:
AttributeErrorTraceback (most recent call last)
<ipython-input-5-56a7e10a510b> in <module>()
----> 1 count(cloudantdata,spark)
<ipython-input-2-f2dcd9d73d7e> in count(df, spark)
1 def count(df,spark):
2 #TODO Please enter your code here
----> 3 df.count().show()
4 return
AttributeError: 'int' object has no attribute 'show'
嗯 - 我想我有錯誤的網址。這應該已經工作,而不是:https://apsportal.ibm.com/analytics/notebooks/c83c959b-2994-4ac7-9af7-f9d33d4dc461/view?access_token=6a057cadfdd07252e5977a5eb65936185673dd1d1213ab8a003874edbfde6808 – Jay