GitHub
deepbox/dataframe

IO, Styling & Plotting

Excel and Parquet helpers, styling primitives, and dataframe-native plotting accessors added for broader reporting workflows.
IO
Styling
type ParquetReadOptions
export type ParquetReadOptions = { /** Columns to read. Default: all columns. */ readonly columns?: readonly string[]; };
Options for reading a Parquet file.
type ParquetWriteOptions
export type ParquetWriteOptions = { /** Created-by string. Default: "deepbox" */ readonly createdBy?: string; };
Zero-dependency Parquet reader and writer for Deepbox DataFrames.
type XlsxReadOptions
export type XlsxReadOptions = { /** Sheet name to read. Default: first sheet. */ readonly sheet?: string; /** Whether the first row contains headers. Default: true. */ readonly header?: boolean; /** * Maximum decompress…
Zero-dependency Excel (.xlsx) reader and writer for Deepbox DataFrames.
type XlsxWriteOptions
export type XlsxWriteOptions = { /** Sheet name. Default: "Sheet1". */ readonly sheetName?: string; };
Options for writing an XLSX file.
type CellStyle
export type CellStyle = { readonly color?: string; readonly backgroundColor?: string; readonly fontWeight?: string; readonly fontStyle?: string; readonly textAlign?: string; };
DataFrame conditional formatting / styling accessor.
type StyleFunction
export type StyleFunction = (value: unknown, row: number, col: number) => CellStyle;
A formatting function that receives a cell value and returns a CSS-like style object.

PlotAccessor

Plotting accessor for DataFrame.

StyleAccessor

Style accessor for DataFrame.

readParquet
export declare function readParquet(buffer: Uint8Array, options?: ParquetReadOptions): { columns: string[]; data: Record<string, unknown>[]; };

Read column data from a Parquet buffer.

readXlsx
export declare function readXlsx(buffer: Uint8Array, options?: XlsxReadOptions): { columns: string[]; data: Record<string, string | number | boolean | null>[]; };

Read cell data from an XLSX buffer.

writeParquet
export declare function writeParquet(columns: readonly string[], data: readonly Record<string, unknown>[], options?: ParquetWriteOptions): Uint8Array;

Write DataFrame-like data to a Parquet buffer.

writeXlsx
export declare function writeXlsx(columns: readonly string[], data: readonly Record<string, string | number | boolean | null | undefined>[], options?: XlsxWriteOptions): Uint8Array;

Write DataFrame-like data to an XLSX buffer.

dataframe-io-styling.ts
import {  DataFrame,  readXlsx,  writeParquet,  writeXlsx,} from "deepbox/dataframe";const df = new DataFrame({  name: ["A", "B", "C"],  score: [88, 74, 95],});const columns = df.columns;const data = df.toArray().map((row) => ({  name: String(row[0]),  score: Number(row[1]),}));const xlsx = writeXlsx(columns, data);const parquet = writeParquet(columns, data);const roundTripped = readXlsx(xlsx);console.log(roundTripped);console.log(parquet.length);