zhengruifeng commented on code in PR #42748:
URL: https://github.com/apache/spark/pull/42748#discussion_r1311348094
##########
python/pyspark/sql/dataframe.py:
##########
@@ -5503,13 +5502,15 @@ def drop(self, *cols: "ColumnOrName") -> "DataFrame":
# type: ignore[misc]
| 16| 85|
+---+------+
- Can not drop col('name') due to ambiguous reference.
-
+ Example 5: Can not drop col('name') due to ambiguous reference.
+ >>> from pyspark.sql.functions import col
>>> df3.drop(col("name")).show()
Traceback (most recent call last):
...
pyspark.errors.exceptions.captured.AnalysisException:
[AMBIGUOUS_REFERENCE] Reference...
+ Example 6: Can not find a column matching the expression "a.b.c".
+ >>> from pyspark.sql.functions import lit
Review Comment:
let's follow the `quick start` example in this PR:
`from pyspark.sql import functions as sf`
--
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]