You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "devin-petersohn (via GitHub)" <gi...@apache.org> on 2026/04/24 16:49:19 UTC
[PR] [SPARK-46160][PYTHON] Add axis parameter to DataFrame.shift in pandas API on Spark [spark]
devin-petersohn opened a new pull request, #55545:
URL: https://github.com/apache/spark/pull/55545
### What changes were proposed in this pull request?
Add `axis` parameter to `DataFrame.shift()` in the pandas API on Spark. `axis=1` shifts values across columns using a `pandas_udf`, with a fast path for small DataFrames following the `compute.shortcut_limit` pattern.
### Why are the changes needed?
pandas `DataFrame.shift()` supports `axis=1` but the pandas API on Spark did not.
### Does this PR introduce _any_ user-facing change?
Yes. `DataFrame.shift()` now accepts `axis` (`0`, `1`, `'index'`, `'columns'`). Default behavior is unchanged.
### How was this patch tested?
Added `test_shift_axis` covering axis=0/1, string aliases, various periods, fill_value, single-column, NaN values, multi-index columns, large dataset (UDF path), mixed types, empty DataFrame, and invalid axis.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (claude-opus-4-6)
--
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
Re: [PR] [SPARK-46160][PYTHON] Add axis parameter to DataFrame.shift in pandas API on Spark [spark]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #55545: [SPARK-46160][PYTHON] Add axis parameter to DataFrame.shift in pandas API on Spark
URL: https://github.com/apache/spark/pull/55545
--
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
Re: [PR] [SPARK-46160][PYTHON] Add axis parameter to DataFrame.shift in pandas API on Spark [spark]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #55545:
URL: https://github.com/apache/spark/pull/55545#issuecomment-5161185923
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!
--
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