Github user holdenk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16792#discussion_r99470201
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -1272,16 +1272,18 @@ def replace(self, to_replace, value, subset=None):
             """Returns a new :class:`DataFrame` replacing a value with another 
value.
             :func:`DataFrame.replace` and :func:`DataFrameNaFunctions.replace` 
are
             aliases of each other.
    +        Values `to_replace` and `value` should be homogeneous. Mixed 
string and numeric
    --- End diff --
    
    It's true that it will succeed when passed a float for an int, but it chops 
the float into an int which I suspect would be confusing if anyone passed in 
something with a non-zero decimal component. If you look at the documentation 
in Scala side it says "Key and value of `replacement` map must have the same 
type" 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to