Skip to content

Conversation

@MarcoGorelli
Copy link
Member

What type of PR is this? (check all applicable)

  • πŸ’Ύ Refactor
  • ✨ Feature
  • πŸ› Bug Fix
  • πŸ”§ Optimization
  • πŸ“ Documentation
  • βœ… Test
  • 🐳 Other

Related issues

  • Related issue #<issue number>
  • Closes #<issue number>

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

If you have comments or can explain your changes, please do so below

@MarcoGorelli
Copy link
Member Author

Alright only 5 test failures left

FAILED tests/expr_and_series/is_nan_test.py::test_nan_series[pandas[nullable]] - AssertionError: Mismatch at index 0, key float_na: <NA> != True
Expected: {'int': [False, False, None], 'float': [False, False, None], 'float_na': [True, False, None]}
Got: {'int': [False, False, <NA>], 'float': [False, False, <NA>], 'float_na': [<NA>, False, <NA>]}
FAILED tests/expr_and_series/is_nan_test.py::test_nan_series[pandas[pyarrow]] - AssertionError: Mismatch at index 0, key float_na: <NA> != True
Expected: {'int': [False, False, None], 'float': [False, False, None], 'float_na': [True, False, None]}
Got: {'int': [False, False, <NA>], 'float': [False, False, <NA>], 'float_na': [<NA>, False, <NA>]}
FAILED tests/expr_and_series/str/zfill_test.py::test_str_zfill[pandas[pyarrow]]
FAILED tests/expr_and_series/str/zfill_test.py::test_str_zfill_series[pandas[pyarrow]]
FAILED tests/expr_and_series/reduction_test.py::test_empty_scalar_reduction_with_columns[duckdb]
==== 5 failed, 10891 passed, 231 skipped, 599 xfailed in 115.30s (0:01:55) =====

@MarcoGorelli MarcoGorelli marked this pull request as ready for review October 8, 2025 11:24
@MarcoGorelli MarcoGorelli changed the title chore: some pandas-nightly fixes chore: pandas-nightly and duckdb-nightly fixes Oct 8, 2025
dtypes.Int32: duckdb_dtypes.INTEGER,
dtypes.Int64: duckdb_dtypes.BIGINT,
dtypes.Int128: DuckDBPyType("INT128"),
dtypes.Int128: duckdb_dtypes.DuckDBPyType("INT128"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use

Suggested change
dtypes.Int128: duckdb_dtypes.DuckDBPyType("INT128"),
dtypes.Int128: duckdb_dtypes.HUGEINT,

(and dtypes.UInt128: duckdb_dtypes.UHUGEINT, below)?

echo "$DEPS" | grep 'duckdb==1.1'
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow --constructors=pandas,pyarrow,polars[eager],polars[lazy]
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow --constructors=pandas,pyarrow,polars[eager],polars[lazy],duckdb
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😭

Copy link
Member

@FBruzzesi FBruzzesi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MarcoGorelli - I am pretty onboarded with the duckdb changes.

Regarding pandas I can see we are adding yet another different behavior from polars and pandas pre v3. Is it really not feasible to remap one of the two behavior? e.g. pandas v2 to pandas v3 or pandas v3 to polars? Apologies if the answer to this is obvious, but I didn't even try it myself. And if the answer is negative, should we document in the null vs nan section the pandas v3 behavior?

@MarcoGorelli
Copy link
Member Author

thanks for your review!

there's a whole discussion going on at pandas-dev/pandas#62040 😩 not sure where things will end up, but i think we should wait until the next release before documenting the mode.nan_is_na behaviour (in particular, in case it doesn't land)

@MarcoGorelli MarcoGorelli merged commit 13a1167 into narwhals-dev:main Oct 9, 2025
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants