spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyukjin Kwon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-17902) collect() ignores stringsAsFactors
Date Wed, 18 Oct 2017 01:30:00 GMT

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

Hyukjin Kwon commented on SPARK-17902:
--------------------------------------

Hi [~falaki] and [~shivaram], I was thinking a just simple way such as :

{quote}
if (stringsAsFactors) {
  df[sapply(df, is.character)] <- lapply(df[sapply(df, is.character)], as.factor)
}
{quote}

Would it make sense?

> collect() ignores stringsAsFactors
> ----------------------------------
>
>                 Key: SPARK-17902
>                 URL: https://issues.apache.org/jira/browse/SPARK-17902
>             Project: Spark
>          Issue Type: Bug
>          Components: SparkR
>    Affects Versions: 2.0.1
>            Reporter: Hossein Falaki
>
> `collect()` function signature includes an optional flag named `stringsAsFactors`. It
seems it is completely ignored.
> {code}
> str(collect(createDataFrame(iris), stringsAsFactors = TRUE)))
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message