pyspark.sql.DataFrame.printSchema

DataFrame.printSchema() → None[source]

Prints out the schema in the tree format.

New in version 1.3.0.

Examples

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