我有两个数据框user_base和review_base。 User_base包含字段:elite,user_id,name,review_count,friends,粉丝。
Review_base包含以下字段:review_id,user_id,cool,stars,business,useful,funny。
我想找到所有用户及其评论列表,并从每个数据框中选择一些字段。这是我的代码段:
javax.script.ScriptException: ReferenceError: "document" is not defined in <eval> at line number 32
at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:467)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:451)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:403)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:399)
at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at TestSymbolCreation.main(TestSymbolCreation.java:30)
Caused by: <eval>:32 ReferenceError: "document" is not defined
at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:319)
at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:291)
at jdk.nashorn.internal.objects.Global.__noSuchProperty__(Global.java:1432)
at jdk.nashorn.internal.scripts.Script$Recompilation$149$403515A$\^eval\_.L:1-1$L:32-8$exports(<eval>:32)
at jdk.nashorn.internal.scripts.Script$87$\^eval\_.:program(<eval>:1)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:640)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:228)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:446)
... 5 more
Review_per_user是一个RelationalGroupedDataset类型,但我希望Dataframe类型可以使用其他查询来操作它。我该怎么办呢?
答案 0 :(得分:1)
sudo apt-get install virtualbox