Yikun opened a new pull request #34314:
URL: https://github.com/apache/spark/pull/34314


   ### What changes were proposed in this pull request?
   This patch has changes as below to follow the pandas behavior:
   - **Add nan value process in _non_fractional_astype**: Follow the pandas 
[to_string](https://github.com/pandas-dev/pandas/blob/0a9f9eed3e3eb7d5fa23cbc588e78b9bef915a89/pandas/core/series.py#L1486)
 covert method, it should be `"NaN"` rather than `str(np.nan)`(`"nan"`), which 
is covered by `self.assert_eq(pser.astype(str), psser.astype(str))`.
   - **Add null value process in rpow**, which is covered by `def 
test_rpow(self)`
   - **Add index_ops.hasnans in `astype`**, which is covered by `test_astype`.
   
   This patch also move `numeric_w_nan_pdf` into `numeric_pdf`.
   
   
   
   ### Why are the changes needed?
   Follow the pandas behavior
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, correct the null value result to follow the pandas behavior
   
   
   ### How was this patch tested?
   ut to cover all changes


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