0
from pyspark.sql.functions import split, explode
sheshakespeareDF = sqlContext.read.text(fileName).select(removePunctuation(col('value')))
shakespeareDF.show(15, truncate=False)
数据框看起来是这样的:字数: '列' 对象不是可调用
ss = split(shakespeareDF.sentence," ")
shakeWordsDFa =explode(ss)
shakeWordsDF_S=sqlContext.createDataFrame(shakeWordsDFa,'word')
任何想法,我究竟做错了什么?提示说Column is not iterable
。
我该怎么办?我只想将shakeWordsDFa
更改为数据框并重命名。
这是CS110X HW来自edx – eliasah