Public
Edited
May 1, 2023
2 forks
1 star
Insert cell
Insert cell
hmm = {
const f = new arrow.FixedSizeList(
5,
new arrow.Field("inner", new arrow.Float16())
);

const data = [
new Float32Array([1.1, 2.2, 3.3, 4.4, 5.5]),
new Float32Array([6.6, 7.7, 8.8, 9.9, 10.1])
];

const arrays = data.map((float32Array) => {
return arrow.makeVector(data);
});

let builder = arrow.makeBuilder({
type: f,
children: [{ type: new arrow.Float16() }]
});

for (let datum of data) {
builder = builder.append(datum);
}

const v = builder.finish().toVector();
return v;
}
Insert cell
hmm.get(0).toArray()
Insert cell
hmm.toArray()[0].toArray()
Insert cell
arrow = require("apache-arrow@11.0.0")
Insert cell
g = new arrow.vectorFromArray([1.1, 2.2, 3.3], new arrow.Float16()).toArray()
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more