@loaders.gl/csv
Version:
Framework-independent loader for CSV and DSV table formats
37 lines • 1.71 kB
TypeScript
import type { LoaderOptions } from '@loaders.gl/loader-utils';
import type { ArrowTable, ArrowTableBatch } from '@loaders.gl/schema';
import type { CSVLoaderOptions } from "./csv-loader.js";
export type CSVArrowLoaderOptions = LoaderOptions & {
csv?: Omit<CSVLoaderOptions['csv'], 'shape'>;
};
export declare const CSVArrowLoader: {
readonly dataType: ArrowTable;
readonly batchType: ArrowTableBatch;
readonly parse: (arrayBuffer: ArrayBuffer, options?: CSVLoaderOptions) => Promise<ArrowTable>;
readonly parseText: (text: string, options?: CSVLoaderOptions) => Promise<ArrowTable>;
readonly parseInBatches: typeof parseCSVToArrowBatches;
readonly version: any;
readonly options: {
readonly csv: {
readonly shape: "object-row-table";
readonly optimizeMemoryUsage: false;
readonly header: "auto";
readonly columnPrefix: "column";
readonly quoteChar: "\"";
readonly escapeChar: "\"";
readonly dynamicTyping: true;
readonly comments: false;
readonly skipEmptyLines: true;
readonly delimitersToGuess: [",", "\t", "|", ";"];
};
};
readonly id: "csv";
readonly module: "csv";
readonly name: "CSV";
readonly extensions: ["csv", "tsv", "dsv"];
readonly mimeTypes: ["text/csv", "text/tab-separated-values", "text/dsv"];
readonly category: "table";
};
declare function parseCSVToArrowBatches(asyncIterator: AsyncIterable<ArrayBufferLike | ArrayBufferView> | Iterable<ArrayBufferLike | ArrayBufferView>, options?: CSVArrowLoaderOptions): AsyncIterable<ArrowTableBatch>;
export {};
//# sourceMappingURL=csv-arrow-loader.d.ts.map