This is an automated email from the ASF dual-hosted git repository. gurwls223 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new 13a43708187 [SPARK-38822][PYSPARK][FOLLOWUP] Add version changed for insert loc is out of bounds 13a43708187 is described below commit 13a43708187048e8ae764790d27b3ace69254e6c Author: Yikun Jiang <yikunk...@gmail.com> AuthorDate: Wed Apr 13 11:58:27 2022 +0900 [SPARK-38822][PYSPARK][FOLLOWUP] Add version changed for insert loc is out of bounds ### What changes were proposed in this pull request? Add `versionchanged` for insert loc is out of bounds ### Why are the changes needed? Add `versionchanged` to address comment in https://github.com/apache/spark/pull/36115#issuecomment-1095622571 ### Does this PR introduce _any_ user-facing change? Doc only ### How was this patch tested? ci passed Closes #36168 from Yikun/SPARK-38822-FOLLOWUP. Authored-by: Yikun Jiang <yikunk...@gmail.com> Signed-off-by: Hyukjin Kwon <gurwls...@apache.org> --- python/pyspark/pandas/indexes/base.py | 3 +++ python/pyspark/pandas/indexes/multi.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/python/pyspark/pandas/indexes/base.py b/python/pyspark/pandas/indexes/base.py index c8be0b436fa..d7119f032f3 100644 --- a/python/pyspark/pandas/indexes/base.py +++ b/python/pyspark/pandas/indexes/base.py @@ -2524,6 +2524,9 @@ class Index(IndexOpsMixin): Follows Python list.append semantics for negative values. + .. versionchanged:: 3.4.0 + Raise IndexError when loc is out of bounds to follow Pandas 1.4+ behavior + Parameters ---------- loc : int diff --git a/python/pyspark/pandas/indexes/multi.py b/python/pyspark/pandas/indexes/multi.py index 43ced2f4541..36856943403 100644 --- a/python/pyspark/pandas/indexes/multi.py +++ b/python/pyspark/pandas/indexes/multi.py @@ -1081,6 +1081,9 @@ class MultiIndex(Index): Follows Python list.append semantics for negative values. + .. versionchanged:: 3.4.0 + Raise IndexError when loc is out of bounds to follow Pandas 1.4+ behavior + Parameters ---------- loc : int --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org