DataFrame.
sparkSession
Returns Spark session that created this DataFrame.
DataFrame
New in version 3.3.0.
Changed in version 3.4.0: Supports Spark Connect.
SparkSession
Examples
>>> df = spark.range(1) >>> type(df.sparkSession) <class '...session.SparkSession'>
previous
pyspark.sql.DataFrame.sortWithinPartitions
next
pyspark.sql.DataFrame.stat