Skip to content

Support Pandas 3rc1#1003

Merged
ehsantn merged 48 commits intomainfrom
ehsan/pd_3_rc1
Jan 22, 2026
Merged

Support Pandas 3rc1#1003
ehsantn merged 48 commits intomainfrom
ehsan/pd_3_rc1

Conversation

@ehsantn
Copy link
Collaborator

@ehsantn ehsantn commented Jan 14, 2026

Changes included in this PR

Next set of changes for supporting upcoming Pandas 3.

Testing strategy

Existing tests.

User facing changes

None.

Checklist

  • Pipelines passed before requesting review. To run CI you must include [run CI] in your commit message.
  • I am familiar with the Contributing Guide
  • I have installed + ran pre-commit hooks.

@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

❌ Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.72%. Comparing base (c33fbb5) to head (f76260d).
⚠️ Report is 190 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1003      +/-   ##
==========================================
+ Coverage   66.68%   68.72%   +2.03%     
==========================================
  Files         186      195       +9     
  Lines       66795    67830    +1035     
  Branches     9507     9667     +160     
==========================================
+ Hits        44543    46615    +2072     
+ Misses      19572    18364    -1208     
- Partials     2680     2851     +171     

Copy link
Collaborator

@DrTodd13 DrTodd13 left a comment

Choose a reason for hiding this comment

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

Thanks.

out_arr = arr.apply(_conv_to_double)
# Workaround Int NA being passed as NaN
if arr.dtype == pd.Int64Dtype():
out_arr = out_arr.map(lambda x: None if x == "nan" else x)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Double-check this. Not exactly sure what this is doing but bare "nan" seems weird. Could be np.nan or "np.nan"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

String representation of np.nan is "nan". The previous code converts values to strings.

Copy link
Contributor

@scott-routledge2 scott-routledge2 left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks @ehsantn

from pandas.core.internals.array_manager import SingleArrayManager
except ModuleNotFoundError:
# Pandas >= 3 does not have an array_manager module (uses BlockManager/SinglBlockManager).
class SingleArrayManager:
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like SingleArrayManager is just being used for a type annotation, can we remove it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do in the next PR.

@ehsantn ehsantn merged commit 710c757 into main Jan 22, 2026
126 of 130 checks passed
@ehsantn ehsantn deleted the ehsan/pd_3_rc1 branch January 22, 2026 02:43
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.

3 participants