We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b8188e commit 2e05780Copy full SHA for 2e05780
__tests__/dataframe.test.ts
@@ -1985,6 +1985,19 @@ describe("io", () => {
1985
const actual = df.toRecords();
1986
expect(JSON.stringify(actual)).toEqual(JSON.stringify(expected));
1987
});
1988
+ test("toRecords:quoteChar:emptyHeader", () => {
1989
+ const csv = `|name|,||
1990
+|John|,|green|
1991
+|Anna|,|red|
1992
+`;
1993
+ const df = pl.readCSV(csv, { quoteChar: "|" });
1994
+ const actual = df.toRecords();
1995
+ const expected = [
1996
+ { name: "John", "": "green" },
1997
+ { name: "Anna", "": "red" },
1998
+ ];
1999
+ expect(actual).toEqual(expected);
2000
+ });
2001
test("toObject", () => {
2002
const expected = {
2003
foo: [1],
0 commit comments