Skip to content

Conversation

@roll
Copy link

@roll roll commented Oct 25, 2025

Other projects running into the same problem:



Not sure what is correct behaviour for these tests and why they fail now e.g.:

  ● series functions › 3 dtype: expected matches actual

    expect(received).toEqual(expected) // deep equality

    - Expected  - 1
    + Received  + 1

      Object {
    -   "DataType": "Utf8",
    +   "DataType": "String",
      }

One test failing locally that is not related to the PR:

 FAIL  __tests__/dataframe.test.ts (6.276 s)
  ● additional › upsample


    Expected:
    >>shape: (7, 3)
    ┌────────────┬────────┬────────┐
    │ date       ┆ groups ┆ values │
    │ ---        ┆ ---    ┆ ---    │
    │ date       ┆ str    ┆ f64    │
    ╞════════════╪════════╪════════╡
    │ 2024-02-01 ┆ A      ┆ 0.0    │
    │ 2024-03-01 ┆ A      ┆ 0.0    │
    │ 2024-03-31 ┆ A      ┆ 0.0    │
    │ 2024-04-30 ┆ A      ┆ 2.0    │
    │ 2024-03-31 ┆ B      ┆ 1.0    │
    │ 2024-04-30 ┆ B      ┆ 1.0    │
    │ 2024-05-31 ┆ B      ┆ 3.0    │
    └────────────┴────────┴────────┘
    Received:
    >>shape: (6, 3)
    ┌────────────┬────────┬────────┐
    │ date       ┆ groups ┆ values │
    │ ---        ┆ ---    ┆ ---    │
    │ date       ┆ str    ┆ f64    │
    ╞════════════╪════════╪════════╡
    │ 2024-02-01 ┆ A      ┆ 0.0    │
    │ 2024-03-01 ┆ A      ┆ 0.0    │
    │ 2024-04-01 ┆ A      ┆ 0.0    │
    │ 2024-03-31 ┆ B      ┆ 1.0    │
    │ 2024-04-30 ┆ B      ┆ 1.0    │
    │ 2024-05-31 ┆ B      ┆ 3.0    │
    └────────────┴────────┴────────┘

@Bidek56
Copy link
Collaborator

Bidek56 commented Oct 25, 2025

Python Polars returns String for pl.Series(["foo"]).dtype

@Bidek56
Copy link
Collaborator

Bidek56 commented Oct 25, 2025

bun run test --findRelatedTests __tests__/dataframe.test.ts are passing on my laptop on this branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using constructor.name for dataType.variant seems not to be reliable

2 participants