You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Javier Luraschi (JIRA)" <ji...@apache.org> on 2018/10/25 19:49:00 UTC
[jira] [Commented] (ARROW-2969) [R] Convert between StructArray and
"nested" data.frame column containing data frame in each cell
[ https://issues.apache.org/jira/browse/ARROW-2969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16664222#comment-16664222 ]
Javier Luraschi commented on ARROW-2969:
----------------------------------------
In Spark, it is pretty common to end up with structures like:
{code:java}
jsonlite::fromJSON('[{"city" : "Zurich", "languages": ["English", "German"]}, {"city" : "Seattle", "languages": "English"}]') %>% as_tibble()
# A tibble: 2 x 2
city languages
* <chr> <list>
1 Zurich <chr [2]>
2 Seattle <chr [1]>
{code}
Or,
{code:java}
jsonlite::fromJSON('[{"city" : "Zurich", "languages": ["English", {"other": "German"}]}, {"city" : "Seattle", "languages": ["English", {"other": "Spanish"}]}]') %>% as_tibble()
# A tibble: 2 x 2
city languages
* <chr> <list>
1 Zurich <list [2]>
2 Seattle <list [2]>
{code}
Data frames with nested data frames are not that common in Spark.
> [R] Convert between StructArray and "nested" data.frame column containing data frame in each cell
> -------------------------------------------------------------------------------------------------
>
> Key: ARROW-2969
> URL: https://issues.apache.org/jira/browse/ARROW-2969
> Project: Apache Arrow
> Issue Type: New Feature
> Components: R
> Reporter: Wes McKinney
> Priority: Major
>
> These are starting to be more widely used with the tidyr package and elsewhere cc [~hadley]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)