SparkSession.
version
The version of Spark on which this application is running.
New in version 2.0.0.
Changed in version 3.4.0: Supports Spark Connect.
the version of Spark in string.
Examples
>>> _ = spark.version
previous
pyspark.sql.SparkSession.udtf
next
pyspark.sql.SparkSession.builder.create