You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2017/02/25 02:36:44 UTC

[jira] [Commented] (SPARK-19734) OneHotEncoder __init__ uses dropLast but doc strings all say includeFirst

    [ https://issues.apache.org/jira/browse/SPARK-19734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15883953#comment-15883953 ] 

Sean Owen commented on SPARK-19734:
-----------------------------------

Agreed, feel free to open a PR to fix it.

> OneHotEncoder __init__ uses dropLast but doc strings all say includeFirst
> -------------------------------------------------------------------------
>
>                 Key: SPARK-19734
>                 URL: https://issues.apache.org/jira/browse/SPARK-19734
>             Project: Spark
>          Issue Type: Documentation
>          Components: PySpark
>    Affects Versions: 1.5.2, 1.6.3, 2.0.2, 2.1.0
>            Reporter: Corey
>            Priority: Minor
>              Labels: documentation, easyfix
>
> The {{OneHotEncoder.__init__}} doc string in PySpark has an input keyword listed as {{includeFirst}}, whereas the code actually uses {{dropLast}}.
> This especially confusing because the {{__init__}} function accepts only keywords, and following the documentation on the web (https://spark.apache.org/docs/2.0.1/api/python/pyspark.ml.html#pyspark.ml.feature.OneHotEncoder) or of {{help}} in Python will result in the error:
> {quote}
> TypeError: __init__() got an unexpected keyword argument 'includeFirst'
> {quote}
> The error is immediately viewable in the source code:
> {code}
>     @keyword_only
>     def __init__(self, dropLast=True, inputCol=None, outputCol=None):
>         """
>         __init__(self, includeFirst=True, inputCol=None, outputCol=None)
>         """
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org