You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Dominik Moritz (Jira)" <ji...@apache.org> on 2021/04/26 01:48:00 UTC

[jira] [Created] (ARROW-12536) [JS] Construct tables from an iterable of objects or js array columns

Dominik Moritz created ARROW-12536:
--------------------------------------

             Summary: [JS] Construct tables from an iterable of objects or js array columns
                 Key: ARROW-12536
                 URL: https://issues.apache.org/jira/browse/ARROW-12536
             Project: Apache Arrow
          Issue Type: Improvement
          Components: JavaScript
            Reporter: Dominik Moritz


Right now, Arrow has no automatic type inference for JavaScript types, so I think we would need to add that. 

{code:javascript}
// Convert from JS types automatically
const t = Arrow.Table.from({
	Country: ["USA", "Canada", "Mexico"],
	GDP: [123, 234, 345],
})

// I'd also like Arrow to support other common JS table formats:
const t = Arrow.Table.from([
	{Country: "USA", GDP: 123},
	{Country: "Canada", GDP: 234},
	{Country: "Mexico", GDP: 345},
])

const t = Arrow.Table.from([
	["Country", "GDP"],
	["USA", 123],
	["Canada", 234],
	["Mexico", 345],
])
{code}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)