Skip to content

Couple of warnings for python #423

@ttc0419

Description

@ttc0419

Sample Code:

from graphframes import *
from pyspark.sql import SparkSession

sc = SparkSession.builder.getOrCreate()
v = sc.createDataFrame([("a",), ("b",), ], ["id", ])
e = sc.createDataFrame([("a", "b"), ], ["src", "dst"])
g = GraphFrame(v, e)
g.inDegrees.show()

Warnings:

pyspark/sql/dataframe.py:148: UserWarning: DataFrame.sql_ctx is an internal property, and will be removed in future releases. Use DataFrame.sparkSession instead.

which is raised by g = GraphFrame(v, e) at

File "graphframes/graphframe.py", line 63, in __init__
    self._sqlContext = v.sql_ctx

pyspark/sql/dataframe.py:127: UserWarning: DataFrame constructor is internal. Do not directly use it.

which is raised by g.inDegrees.show() at

File "graphframes/graphframe.py", line 156, in inDegrees
    return DataFrame(jdf, self._sqlContext)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions