Skip to content

Commit 27b253b

Browse files
committed
Make option param in readCSV optional
1 parent 1ae6120 commit 27b253b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/danfojs-browser/src/io/io.csv.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import { CsvInputOptions, CsvOutputOptionsBrowser } from "../types"
4646
* const df = await readCSV("./data/sample.csv")
4747
* ```
4848
*/
49-
const $readCSV = async (file: any, options: CsvInputOptions): Promise<DataFrame> => {
49+
const $readCSV = async (file: any, options?: CsvInputOptions): Promise<DataFrame> => {
5050
return new Promise(resolve => {
5151
Papa.parse(file, {
5252
...options,

src/danfojs-node/src/io/io.csv.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import { CsvInputOptions, CsvOutputOptionsNode } from "../types"
4848
* const df = await readCSV("./data/sample.csv")
4949
* ```
5050
*/
51-
const $readCSV = async (filePath: string, options: CsvInputOptions): Promise<DataFrame> => {
51+
const $readCSV = async (filePath: string, options?: CsvInputOptions): Promise<DataFrame> => {
5252
if (filePath.startsWith("http") || filePath.startsWith("https")) {
5353
return new Promise(resolve => {
5454
const dataStream = request.get(filePath);

0 commit comments

Comments
 (0)