我正在尝试在Windows 10计算机上使用def bar(x):
start_time = time.time()
res_list = # do something and store result as an iterator in res_list
print(time.time() - start_time)
return res_list
def foo():
li = list(range(0, 10000000))
test_rdd = sc.parallelize(li)
test_rdd = test_rdd.repartition(200)
res_rdd = test_rdd.mapPartitions(lambda x: bar(x))
res_df = spark.createDataFrame(res_rdd, cols)
'''
write spark dataframe to mongodb
'''
软件包在Rstudio(1.2.5 *)中使用Python。我通过Anaconda安装了Python,但似乎网状结构(或基R)找不到它。
reticulate
哪个返回:
library(reticulate)
Sys.which("python")
我应该解释找不到python吗? 我该怎么解决?
Anaconda安装建议不要保存PATH,所以我没有保存,也许就是问题