You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Rok Mihevc (Jira)" <ji...@apache.org> on 2023/01/11 07:20:03 UTC
[jira] [Updated] (ARROW-2202) [JS] Add DataFrame.toJSON
[ https://issues.apache.org/jira/browse/ARROW-2202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rok Mihevc updated ARROW-2202:
------------------------------
External issue URL: https://github.com/apache/arrow/issues/18166
> [JS] Add DataFrame.toJSON
> -------------------------
>
> Key: ARROW-2202
> URL: https://issues.apache.org/jira/browse/ARROW-2202
> Project: Apache Arrow
> Issue Type: Improvement
> Components: JavaScript
> Reporter: Brian Hulette
> Priority: Major
>
> Currently, {{CountByResult}} has its own [{{toJSON}} method|https://github.com/apache/arrow/blob/master/js/src/table.ts#L282], but there should be a more general one for every {{DataFrame}}.
> {{CountByResult.toJSON}} returns:
> {code:json}
> {
> "keyA": 10,
> "keyB": 10,
> ...
> }{code}
> A more general {{toJSON}} could just return a list of objects with an entry for each column. For the above {{CountByResult}}, the output would look like:
> {code:json}
> [
> {value: "keyA", count: 10},
> {value: "keyB", count: 10},
> ...
> ]{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)