You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "itholic (via GitHub)" <gi...@apache.org> on 2024/01/02 01:43:29 UTC

[PR] [SPARK-46553][PS] `FutureWarning` for `interpolate` with object dtype [spark]

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

   
   ### What changes were proposed in this pull request?
   
   This PR proposes to issue a `FutureWarning` for `(DataFrame|Series).interpolate` with object dtype.
   
   
   ### Why are the changes needed?
   
   To match the behavior with Pandas. Using object dtype for `interpolate` is deprecated and will raise exception in the future version, so we should issue the proper warning such as Pandas does.
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   Given DataFrame below,
   
   ```python
   >>> psdf = ps.DataFrame({"A": ['a', 'b', 'c'], "B": [1, 2, 3]})
   >>> psdf
      A  B
   0  a  1
   1  b  2
   2  c  3
   ```
   
   **Before**
   
   ```python
   >>> psdf.interpolate()  # Excluding column with object dtype without any warning unlike pandas
      B
   0  1
   1  2
   2  3
   ```
   
   
   **After**
   ```python
   >>> psdf.interpolate()  # Issuing a proper warning
   FutureWarning: DataFrame.interpolate with object dtype is deprecated and will raise in a future version. Call df.infer_objects(copy=False) before interpolating instead.
     warnings.warn(
      B
   0  1
   1  2
   2  3
   ```
   
   ### How was this patch tested?
   
   No behavior changes, so the existing CI should pass.
   
   
   ### 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-46553][PS] `FutureWarning` for `interpolate` with object dtype [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #44550: [SPARK-46553][PS] `FutureWarning` for `interpolate` with object dtype
URL: https://github.com/apache/spark/pull/44550


-- 
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-46553][PS] `FutureWarning` for `interpolate` with object dtype [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #44550:
URL: https://github.com/apache/spark/pull/44550#issuecomment-1873743602

   Merged to master.


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