allisonwang-db commented on code in PR #47323:
URL: https://github.com/apache/spark/pull/47323#discussion_r1683333029
##########
python/pyspark/sql/dataframe.py:
##########
@@ -3913,10 +3913,11 @@ def unpivot(
ids : str, Column, tuple, list
Column(s) to use as identifiers. Can be a single column or column
name,
or a list or tuple for multiple columns.
- values : str, Column, tuple, list, optional
- Column(s) to unpivot. Can be a single column or column name, or a
list or tuple
- for multiple columns. If specified, must not be empty. If not
specified, uses all
- columns that are not set as `ids`.
+
+ values : str, Column, tuple, list
+ Identifies the columns to unpivot. Accepts a single column, a Column
object, or a collection (list or tuple) of columns.
+ Must be explicitly provided and not left empty. Use to specify the
columns for transformation, excluding any ids
Review Comment:
`values` is an Optional type parameter, not optional to specify. According
to the original docstring, it should be able to take a `None` value.
I think we can just change the last sentence of the description to be "If
None, uses all columns that are not set as `ids`."
--
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]