pyspark.sql.DataFrame.schema¶
-
property
DataFrame.
schema
¶ Returns the schema of this
DataFrame
as apyspark.sql.types.StructType
.Examples
>>> df.schema StructType([StructField('age', IntegerType(), True), StructField('name', StringType(), True)])