HyukjinKwon commented on a change in pull request #33882:
URL: https://github.com/apache/spark/pull/33882#discussion_r700776767
##########
File path: python/pyspark/pandas/namespace.py
##########
@@ -2747,13 +2747,20 @@ def merge(
@no_type_check
-def to_numeric(arg):
+def to_numeric(arg, errors="raise"):
"""
Convert argument to a numeric type.
Parameters
----------
arg : scalar, list, tuple, 1-d array, or Series
+ Argument to be converted.
+ errors : {'ignore', 'raise', 'coerce'}, default 'coerce'
+ Note that 'ignore' are not supported yet when the `arg` is Series.
+
+ * If 'coerce', then invalid parsing will be set as NaN.
+ * If 'ignore', then invalid parsing will return the input.
+ * If 'raise', then invalid parsing will raise an exception.
Review comment:
```suggestion
errors : {'raise', 'coerce'}, default 'coerce'
* If 'coerce', then invalid parsing will be set as NaN.
* If 'raise', then invalid parsing will raise an exception.
.. note:: pandas support 'ignore' but this is not implemented yet.
```
--
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]