Создать таблицу Pyspark SQL
df.createOrReplaceTempView("tableA")
spark.sql("SELECT count(*) from tableA").show()
Sore Stork
df.createOrReplaceTempView("tableA")
spark.sql("SELECT count(*) from tableA").show()