HyukjinKwon commented on a change in pull request #32771:
URL: https://github.com/apache/spark/pull/32771#discussion_r645271386
##########
File path: python/pyspark/sql/functions.py
##########
@@ -101,19 +101,19 @@ def lit(col):
@since(1.3)
-def col(col):
+def col(col_like):
"""
Returns a :class:`~pyspark.sql.Column` based on the given column name.'
+ Examples
+ --------
+ >>> df = spark.range(1, 10).toDF('x').withColumn('mod3', col('x') % 3)
+ >>> col('x')
+ >>> column('mod3')
"""
- return _invoke_function("col", col)
+ return _invoke_function("col", col_like)
Review comment:
```suggestion
return _invoke_function("col", col)
```
##########
File path: python/pyspark/sql/functions.py
##########
@@ -101,19 +101,19 @@ def lit(col):
@since(1.3)
-def col(col):
+def col(col_like):
Review comment:
```suggestion
def col(col):
```
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]