You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/02 07:50:16 UTC

[GitHub] [spark] itholic commented on a diff in pull request #37365: [SPARK-39938][PYTHON][PS] Accept all inputs of prefix/suffix which implement __str__ in add_predix/add_suffix

itholic commented on code in PR #37365:
URL: https://github.com/apache/spark/pull/37365#discussion_r935228302


##########
python/pyspark/pandas/tests/test_dataframe.py:
##########
@@ -2701,6 +2701,8 @@ def test_add_prefix(self):
         pdf = pd.DataFrame({"A": [1, 2, 3, 4], "B": [3, 4, 5, 6]}, index=np.random.rand(4))
         psdf = ps.from_pandas(pdf)
         self.assert_eq(pdf.add_prefix("col_"), psdf.add_prefix("col_"))
+        self.assert_eq(pdf.add_prefix(1.1), psdf.add_prefix(1.1))
+        self.assert_eq(pdf.add_prefix(True), psdf.add_prefix(True))

Review Comment:
   qq: Can we also accept other types? e.g. `TimestampType`, `datetime` ?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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