How to use pyspark in pycharm to connect to the graph database and call the graph algorithm?

46 Views Asked by At

How to use pyspark in pycharm to connect to the graph database and call the graph algorithm? Is there such api?

Also,may I ask how the object class 'py4j.java_gateway.JavaObject' after calling the graph algorithm is converted back to the pyspark dataframe object class 'pyspark.sql.dataframe.DataFrame'?

1

There are 1 best solutions below

0
Wey Gu On BEST ANSWER

try in this way:

from pyspark.sql import DataFrame

jdf = jdf.toDF()
df = DataFrame(jdf, spark)