snowflake.snowpark.DataFrame.printSchema¶

DataFrame.printSchema(level: Optional[int] = None) → None[source]¶

Prints the schema of a dataframe in tree format.

Parameters:

level – The level to print to for nested schemas.

Examples::
>>> df = session.create_dataframe([(1, "a"), (2, "b")], schema=["a", "b"])
>>> df.print_schema()
root
 |-- "A": LongType() (nullable = False)
 |-- "B": StringType() (nullable = False)
Copy