SparkSession.
table
Returns the specified table as a DataFrame.
DataFrame
New in version 2.0.0.
Examples
>>> df.createOrReplaceTempView("table1") >>> df2 = spark.table("table1") >>> sorted(df.collect()) == sorted(df2.collect()) True