UNPKG

arquero

Version:

Query processing and transformation of array-backed data tables.

15 lines (14 loc) 805 B
/** * Select columns by index and rename them to the provided names. Returns a * selection helper function that takes a table as input and produces a * rename map as output. If the number of provided names is less than the * number of table columns, the rename map will only include entries for the * provided names. If the number of table columns is less than then number of * provided names, only the rename map will only include entries that cover * the existing columns. * @param {...(string|string[])} names An ordered list of column names. * @return {Function} Selection function compatible with {@link Table#select}. * @example table.rename(aq.names('a', 'b', 'c')) * @example table.select(aq.names(['a', 'b', 'c'])) */ export function names(...names: (string | string[])[]): Function;