Hi Ryan, Here or [email protected] a fine place to ask :) The metadata on Table/Column/Field objects are all immutable, so doing this right now would require creating a new instance of Table with the field renamed, which takes quite a lot of boilerplate. A helper for renaming a column (or even better a generalization of select [1] that lets you do a full projection, including column renames) would be a great contribution.
Here's an example of creating a renamed column, which should get you most of the way to creating a Table with a renamed column: https://observablehq.com/@theneuralbit/renaming-an-arrow-column Brian [1] https://github.com/apache/arrow/blob/ff7ee06020949daf66ac05090753e1a17736d9fa/js/src/table.ts#L249 On Thu, Jun 25, 2020 at 4:04 PM Ryan McKinley <[email protected]> wrote: > Apologies if this is the wrong list or place to ask... > > What is the best way to update a column name for a Table in javascript? > > const col = table.getColumnAt(i); > col.name = 'new name!' > > Currently: Cannot assign to 'name' because it is a read-only property > > Thanks! > > ryan >
