You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2025/03/17 02:34:56 UTC
[PR] [SPARK-51112][PYTHON][CONNECT][FOLLOW-UP] Explicitly set index=range(0) for empty table [spark]
HyukjinKwon opened a new pull request, #50292:
URL: https://github.com/apache/spark/pull/50292
### What changes were proposed in this pull request?
This PR is a followup of https://github.com/apache/spark/pull/49834 that uses `range(0)` for its index explicitly.
### Why are the changes needed?
In order to avoid having behaviour changes.
Without this fix / pandas 1.5.3
```
>>> import pandas as pd
>>> pd.DataFrame(columns=["a"]).index
Index([], dtype='object')
```
With this fix / pandas 1.5.3
```
>>> import pandas as pd
>>> pd.DataFrame(columns=["a"], index=range(0)).index
RangeIndex(start=0, stop=0, step=1)
```
pandas 2.x
```
>>> import pandas as pd
>>> pd.DataFrame(columns=["a"]).index
RangeIndex(start=0, stop=0, step=1)
```
### Does this PR introduce _any_ user-facing change?
No, this PR technically fixes a regression.
### How was this patch tested?
Manually ran tests against pandas 1.5.3
### Was this patch authored or co-authored using generative AI tooling?
No.
--
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-51112][PYTHON][CONNECT][FOLLOW-UP] Explicitly set index=range(0) for empty table [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #50292: [SPARK-51112][PYTHON][CONNECT][FOLLOW-UP] Explicitly set index=range(0) for empty table
URL: https://github.com/apache/spark/pull/50292
--
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-51112][PYTHON][CONNECT][FOLLOW-UP] Explicitly set index=range(0) for empty table [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #50292:
URL: https://github.com/apache/spark/pull/50292#issuecomment-2728931917
Merged to master and branch-4.0.
--
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