You are viewing documentation about an older version (1.26.0). View latest version

snowflake.snowpark.DataFrame.print_schema

DataFrame.print_schema(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