spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HyukjinKwon <...@git.apache.org>
Subject [GitHub] spark pull request #15053: [Doc] improve python API docstrings
Date Tue, 13 Sep 2016 00:36:22 GMT
Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15053#discussion_r78479675
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -1378,6 +1404,7 @@ def withColumn(self, colName, col):
             :param colName: string, name of the new column.
             :param col: a :class:`Column` expression for the new column.
     
    +        >>> df = spark.createDataFrame([('Alice', 2), ('Bob', 5)], ['name',
'age'])
             >>> df.withColumn('age2', df.age + 2).collect()
             [Row(age=2, name=u'Alice', age2=4), Row(age=5, name=u'Bob', age2=7)]
    --- End diff --
    
    `[Row(name=u'Alice', age=2, age2=4), Row(name=u'Bob', age=5, age2=7)]`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message