pyspark.sql.DataFrame.printSchema

DataFrame.printSchema() → None

Prints out the schema in the tree format.

Examples

>>> df.printSchema()
root
 |-- age: integer (nullable = true)
 |-- name: string (nullable = true)