nodejs-polars
Version:
Polars: Blazingly fast DataFrames in Rust, Python, Node.js, R and SQL
28 lines (27 loc) • 746 B
TypeScript
import { type Expr } from "../expr";
/**
* Struct functions for Lazy datatframes
*/
export interface ExprStruct {
/**
* Access a field by name
* @param name - name of the field
*/
field(name: string): Expr;
/**
* Access a field by index (zero based index)
* @param index - index of the field (starts at 0)
*/
nth(index: number): Expr;
/**
* Rename the fields of a struct
* @param names - new names of the fields
*/
renameFields(names: string[]): Expr;
/**
* Add/replace fields in a struct
* @param fields - array of expressions for new fields
*/
withFields(fields: Expr[]): Expr;
}
export declare const ExprStructFunctions: (_expr: any) => ExprStruct;