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

Max Moroz commented on SPARK-17496:
-----------------------------------

Agreed, I thought 1 means randomly permute the DataFrame like in pandas,
but it doesn't. So pointless to give argument 1.

That said, it's a bit weird to have such strict type checking in a python
API. But I guess when calling Java functions it's unavoidable.



> missing int to float coercion in df.sample() signature
> ------------------------------------------------------
>
>                 Key: SPARK-17496
>                 URL: https://issues.apache.org/jira/browse/SPARK-17496
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>    Affects Versions: 2.0.0
>            Reporter: Max Moroz
>            Priority: Trivial
>
> {code}
> # works
> spark.createDataFrame([[1], [2], [3]]).sample(True, 1.0)
> # doesn't work
> spark.createDataFrame([[1], [2], [3]]).sample(True, 1)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to