我正在尝试将已转换为数据帧的单词列表保存到 databricks 中的表中,以便稍后在集群重新启动时查看或引用它。
我已经尝试了下面的代码,但它一直给我一个错误或确实运行,但我看不到数据库中的表
myWords_External=[['this', 'is', 'my', 'world'],['this', 'is', 'the', 'problem']]
df1 = pd.DataFrame(myWords_External)
df1.write.mode("overwrite").saveAsTable("temp.eehara_trial_table_9_5_19")
Run Code Online (Sandbox Code Playgroud)
最后一行给了我以下错误
AttributeError: 'DataFrame' object has no attribute 'write'
Run Code Online (Sandbox Code Playgroud)