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


##########
python/pyspark/pandas/tests/test_dataframe.py:
##########
@@ -6044,6 +6044,19 @@ def test_mode(self):
         with self.assertRaises(ValueError):
             psdf.mode(axis=2)
 
+        def f(index, iterator):
+            return ["3", "3", "3", "3", "4"] if index == 3 else ["0", "1", 
"2", "3", "4"]
+
+        rdd = self.spark.sparkContext.parallelize(
+            [
+                1,
+            ],
+            4,

Review Comment:
   nit: can we just is one or two line some thing like:
   
   ```python
   rdd = self.spark.sparkContext.parallelize([1], 4)
       .mapPartitionsWithIndex(f)
   ```
   
   ?? I suspect it's maybe adjusted by black script tho, 😂 



-- 
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]

Reply via email to