itholic opened a new pull request #34397:
URL: https://github.com/apache/spark/pull/34397


   ### What changes were proposed in this pull request?
   
   This is follow-up for https://github.com/apache/spark/pull/34335.
   
   
   ### Why are the changes needed?
   
   The previous bug depends on the pandas version, not the Spark version.
   
   So the difference is still alive with pandas < 1.3.
   
   For example,
   
   ```python
   # Spark 3.2 with pandas 1.2.
   >>> pidx = pd.Index([10, 20, 15, 30, 45, None], name="x")
   >>> psidx = ps.Index(pidx)
   
   >>> pidx
   Index([10, 20, 15, 30, 45, None], dtype='object', name='x')
   >>> psidx
   Float64Index([10.0, 20.0, 15.0, 30.0, 45.0, nan], dtype='float64', name='x')
   
   >>> pidx.astype(str)
   Index(['10', '20', '15', '30', '45', 'None'], dtype='object', name='x')
   >>> psidx.astype(str)
   Index(['10.0', '20.0', '15.0', '30.0', '45.0', 'nan'], dtype='object', 
name='x')
   ```
   
   I think many people are still using pandas < 1.3, so maybe we'd better to 
separate the test for old version of pandas for now.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No, it's test only
   
   ### How was this patch tested?
   
   Unittest


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