You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Brian Hulette (JIRA)" <ji...@apache.org> on 2018/02/22 22:44:00 UTC

[jira] [Created] (ARROW-2202) [JS] Add DataFrame.toJSON

Brian Hulette created ARROW-2202:
------------------------------------

             Summary: [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


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
(v7.6.3#76005)