xinrong-databricks commented on code in PR #36246:
URL: https://github.com/apache/spark/pull/36246#discussion_r853367104
##########
python/pyspark/pandas/tests/test_generic_functions.py:
##########
@@ -33,17 +33,18 @@ def test_interpolate_error(self):
with self.assertRaisesRegex(ValueError, "limit must be > 0"):
psdf.interpolate(limit=0)
- def _test_series_interpolate(self, pser):
- psser = ps.from_pandas(pser)
- self.assert_eq(psser.interpolate(), pser.interpolate())
- for l1 in range(1, 5):
- self.assert_eq(psser.interpolate(limit=l1),
pser.interpolate(limit=l1))
-
- def _test_dataframe_interpolate(self, pdf):
- psdf = ps.from_pandas(pdf)
- self.assert_eq(psdf.interpolate(), pdf.interpolate())
- for l2 in range(1, 5):
- self.assert_eq(psdf.interpolate(limit=l2),
pdf.interpolate(limit=l2))
+ with self.assertRaisesRegex(ValueError, "invalid limit_direction"):
+ psdf.interpolate(limit_direction="jump")
+
+ def _test_interpolate(self, pobj):
Review Comment:
Nice!!
--
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]