Skip to content

Merge pandas3 feature branch into main - #22518

Merged
samson-nvidia merged 434 commits into
mainfrom
pandas3
May 19, 2026
Merged

Merge pandas3 feature branch into main#22518
samson-nvidia merged 434 commits into
mainfrom
pandas3

Conversation

@galipremsagar

@galipremsagar galipremsagar commented May 15, 2026

Copy link
Copy Markdown
Contributor

Description

This PR introduces pandas-3.x support in cudf

closes #20816
closes #20859

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

vyasr and others added 30 commits March 9, 2026 18:03
Update doctests for pandas 3.0 compatibility
## Description
This PR fixes string UDF failures.

## Checklist
- [ ] I am familiar with the [Contributing
Guidelines](https://github.com/rapidsai/cudf/blob/HEAD/CONTRIBUTING.md).
- [ ] New or existing tests cover these changes.
- [ ] The documentation is up to date with these changes.
Forward-merge main into pandas3
Fix join bug that shows up in `Index.difference`
## Description
This PR fixes binops failures:
1. By updating the pytest correctly.
2. By allowing cai to be constructed for nullable pandas types.


`pandas3`:
```
== 742 failed, 77697 passed, 19475 skipped, 1551 xfailed in 494.85s (0:08:14) ==
```
This PR:
```
== 686 failed, 77753 passed, 19475 skipped, 1551 xfailed in 494.02s (0:08:14) ==
```

## Checklist
- [x] I am familiar with the [Contributing
Guidelines](https://github.com/rapidsai/cudf/blob/HEAD/CONTRIBUTING.md).
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
## Description
<!-- Provide a standalone description of changes in this PR. -->
<!-- Reference any issues closed by this PR with "closes #1234". -->
<!-- Note: The pull request title will be included in the CHANGELOG. -->
The variable conditionally reassigned in the code was changed previously
but not the later conditional using that variable.

Before:
`== 689 failed, 77747 passed, 19478 skipped, 1551 xfailed in 573.81s
(0:09:33) ==`
After:
`== 670 failed, 77766 passed, 19478 skipped, 1551 xfailed in 581.15s
(0:09:41) ==`

## Checklist
- [x] I am familiar with the [Contributing
Guidelines](https://github.com/rapidsai/cudf/blob/HEAD/CONTRIBUTING.md).
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
## Description
This PR fixes `astype(category)` on empty columns.

`pandas3`:
```
== 742 failed, 77697 passed, 19475 skipped, 1551 xfailed in 494.85s (0:08:14) ==
```
This PR:
```
== 719 failed, 77720 passed, 19475 skipped, 1551 xfailed in 492.81s (0:08:12) ==
```

## Checklist
- [x] I am familiar with the [Contributing
Guidelines](https://github.com/rapidsai/cudf/blob/HEAD/CONTRIBUTING.md).
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
Forward-merge main into pandas3
## Description
This PR fixes type assertion issues in udf tests. 
`pandas3`:

```
== 766 failed, 77673 passed, 19475 skipped, 1551 xfailed in 493.01s (0:08:13) ==
```
This PR:
```
== 486 failed, 77953 passed, 19475 skipped, 1551 xfailed in 486.86s (0:08:06) ==
```

## Checklist
- [x] I am familiar with the [Contributing
Guidelines](https://github.com/rapidsai/cudf/blob/HEAD/CONTRIBUTING.md).
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
## Description
This PR fixes all `explode` failures by switching to arrow types for
comparison.

## Checklist
- [x] I am familiar with the [Contributing
Guidelines](https://github.com/rapidsai/cudf/blob/HEAD/CONTRIBUTING.md).
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
## Description
<!-- Provide a standalone description of changes in this PR. -->
<!-- Reference any issues closed by this PR with "closes #1234". -->
<!-- Note: The pull request title will be included in the CHANGELOG. -->
This PR removes all configurability around copy-on-write and turns it on
unconditionally. I didn't remove some of the behavioral tests for CoW so
we still have some level of testing of CoW correctness.

## Checklist
- [x] I am familiar with the [Contributing
Guidelines](https://github.com/rapidsai/cudf/blob/HEAD/CONTRIBUTING.md).
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
Forward-merge main into pandas3
## Description
This PR fixes all pytest failures in `test_apply` similar to
#21731

This PR fixes 28 pytest failures.

## Checklist
- [x] I am familiar with the [Contributing
Guidelines](https://github.com/rapidsai/cudf/blob/HEAD/CONTRIBUTING.md).
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
## Description
This PR fixes 8 pytest that are failing due to the following error in
`pandas-3.0`:
```
pyarrow.lib.ArrowNotImplementedError: Unsupported cast from fixed_size_binary[8] to decimal64 using function cast_decimal64
```

## Checklist
- [x] I am familiar with the [Contributing
Guidelines](https://github.com/rapidsai/cudf/blob/HEAD/CONTRIBUTING.md).
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
## Description
<!-- Provide a standalone description of changes in this PR. -->
<!-- Reference any issues closed by this PR with "closes #1234". -->
<!-- Note: The pull request title will be included in the CHANGELOG. -->
The previous version of the test included specific expectations, but all
we really need to assert is that cudf and pandas have matching
behaviors.

## Checklist
- [x] I am familiar with the [Contributing
Guidelines](https://github.com/rapidsai/cudf/blob/HEAD/CONTRIBUTING.md).
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
## Description
This PR fixes all 16 orc pytest failures.
Cpp bug:
```
// The conversion map tells the statistics system how to normalize
// column types before computing min/max. For ORC, all timestamps
// must be converted to nanoseconds because split_nanosecond_timestamp()
// in stats_enc.cu expects nanosecond input.

What happened without the fix: A datetime64[ms] column with min value 1970-07-11 07:00:35.528 (stored as 16527635528 ms since epoch) was passed directly to split_nanosecond_timestamp() which interpreted it as nanoseconds:


split_nanosecond_timestamp(16527635528)
  → treats as 16,527,635,528 nanoseconds
  → 16,527 milliseconds + 635,528 nanoseconds remainder
  → ORC stats report min = 16,527 ms = 16.527 seconds
  → 1970-01-01 00:00:16.527  ← WRONG (off by ~1,000,000x)
With the fix: The value is first converted to nanoseconds via time_point_cast:


16527635528 ms → 16,527,635,528,000,000 ns (via conversion map)
split_nanosecond_timestamp(16527635528000000)
  → 16,527,635,528 milliseconds + 0 nanoseconds remainder
  → ORC stats report min = 16,527,635,528 ms
  → 1970-07-11 07:00:35.528  ← CORRECT
```
## Checklist
- [x] I am familiar with the [Contributing
Guidelines](https://github.com/rapidsai/cudf/blob/HEAD/CONTRIBUTING.md).
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
## Description
This PR fixes the following bug: with pandas 3.x, the default datetime
resolution changed from ns to us. This caused a 1000x unit mismatch: a
"2s" window became 2_000_000_000 (ns) compared against microsecond
values, making the window span ~2000 seconds instead of 2 effectively
turning every rolling window into a cumulative/expanding one.

This PR fixes all 21 pytest failures.

## Checklist
- [x] I am familiar with the [Contributing
Guidelines](https://github.com/rapidsai/cudf/blob/HEAD/CONTRIBUTING.md).
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
## Description
This PR fixes:

1. Missing null mask when listcolumn is converted to string column.
2. timedelta to string conversions.

## Checklist
- [x] I am familiar with the [Contributing
Guidelines](https://github.com/rapidsai/cudf/blob/HEAD/CONTRIBUTING.md).
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
Forward-merge main into pandas3
@vyasr

vyasr commented May 17, 2026

Copy link
Copy Markdown
Contributor

/ok to test d18205d

@galipremsagar

Copy link
Copy Markdown
Contributor Author

/okay to test a63640f

@galipremsagar

Copy link
Copy Markdown
Contributor Author

/okay to test 61d344b

@galipremsagar

Copy link
Copy Markdown
Contributor Author

/rerun tests

@galipremsagar

Copy link
Copy Markdown
Contributor Author

/okay to test ef36765

@galipremsagar

Copy link
Copy Markdown
Contributor Author

/okay to test 50ac059

@galipremsagar

Copy link
Copy Markdown
Contributor Author

pre-commit.ci autofix

@galipremsagar

Copy link
Copy Markdown
Contributor Author

/okay to test d60428f

@galipremsagar

Copy link
Copy Markdown
Contributor Author

/okay to test 1d8bae0

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

Labels

3 - Ready for Review Ready for review by team breaking Breaking change cudf.pandas Issues specific to cudf.pandas DO NOT MERGE Hold off on merging; see PR for details improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. pylibcudf Issues specific to the pylibcudf package Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] Migrate cudf.pandas testing with pandas test suite to 3.0 [Story] Compatibility with pandas 3.0

7 participants