HyukjinKwon commented on code in PR #40916:
URL: https://github.com/apache/spark/pull/40916#discussion_r1174756518
##########
python/pyspark/sql/dataframe.py:
##########
@@ -575,14 +575,23 @@ def schema(self) -> StructType:
)
return self._schema
- def printSchema(self) -> None:
+ def printSchema(self, level: Optional[int] = None) -> None:
"""Prints out the schema in the tree format.
+ Optionally allows to specify how many levels to print if schema is
nested.
.. versionadded:: 1.3.0
.. versionchanged:: 3.4.0
Supports Spark Connect.
+ .. versionchanged:: 3.5.0
+ Added Level parameter.
+
+ Parameters
+ ----------
+ level : int, optional, default None
+ How many levels to print for nested schemas.
Review Comment:
Can we move:
```
.. versionchanged:: 3.5.0
Added Level parameter.
```
to here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]