Creates or replaces a local temporary view with this DataFrame.
The lifetime of this temporary table is tied to the SparkSession
that was used to create this DataFrame.
New in version 2.0.0.
>>> df2 = df.filter(df.age > 3)
>>> df3 = spark.sql("select * from people")
>>> sorted(df3.collect()) == sorted(df2.collect())