Published
Edited
Jun 26, 2020
2 stars
Insert cell
Insert cell
arrow = require('apache-arrow@0.17.0')
Insert cell
scrabble = {
const url = "https://gist.githubusercontent.com/TheNeuralBit/64d8cc13050c9b5743281dcf66059de5/raw/c146baf28a8e78cfe982c6ab5015207c4cbd84e3/scrabble.arrow"
// Get the arrow file from GitHub gist as an ArrayBuffer
const buf = await fetch(url).then(response => response.arrayBuffer());
// Create an arrow Table with it
return arrow.Table.from([new Uint8Array(buf)]);
}
Insert cell
function renameColumn(col, new_name) {
return arrow.Column.new(col.field.clone({'name': new_name}), ...col.chunks);
}
Insert cell
new_col = renameColumn(scrabble.getColumnAt(0), "new name!")
Insert cell
new_col.name
Insert cell
new_col.get(3)
Insert cell
scrabble.getColumnAt(0).get(3)
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more