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: [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