Skip to content

BUG: divmod(pd.NA, s) returns single Series instead of tuple #62196

@MarcoGorelli

Description

@MarcoGorelli

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

print(divmod(pd.NA, pd.Series([1,2,3])))
print(divmod(pd.NA, pd.Series([1,2,3], dtype='Int64')))

Issue Description

The output for the first one above is

(0    <NA>
1    <NA>
2    <NA>
dtype: object, 0    <NA>
1    <NA>
2    <NA>
dtype: object)

which looks correct

The output of the second one is

0    <NA>
1    <NA>
2    <NA>
dtype: Int64

which doesn't look correct, i'd have expected a tuple

Expected Behavior

(0    <NA>
1    <NA>
2    <NA>
dtype: Int64, 0    <NA>
1    <NA>
2    <NA>
dtype: Int64)

Installed Versions

INSTALLED VERSIONS

commit : 5774290
python : 3.11.12
python-bits : 64
OS : Linux
OS-release : 6.6.87.2-microsoft-standard-WSL2
Version : #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8

pandas : 3.0.0.dev0+2310.g57742901a0.dirty
numpy : 2.2.6
dateutil : 2.9.0.post0
pip : 25.2
Cython : 3.1.3
sphinx : 8.2.3
IPython : 9.4.0
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : 4.13.4
bottleneck : 1.5.0
fastparquet : 2024.11.0
fsspec : 2025.7.0
html5lib : 1.1
hypothesis : 6.138.0
gcsfs : 2025.7.0
jinja2 : 3.1.6
lxml.etree : 6.0.0
matplotlib : 3.10.5
numba : 0.61.2
numexpr : 2.11.0
odfpy : None
openpyxl : 3.1.5
psycopg2 : 2.9.10
pymysql : 1.4.6
pyarrow : 21.0.0
pyiceberg : 0.9.1
pyreadstat : 1.3.0
pytest : 8.4.1
python-calamine : None
pytz : 2025.2
pyxlsb : 1.0.10
s3fs : 2025.7.0
scipy : 1.16.1
sqlalchemy : 2.0.43
tables : 3.10.2
tabulate : 0.9.0
xarray : 2025.7.1
xlrd : 2.0.2
xlsxwriter : 3.2.5
zstandard : 0.23.0
qtpy : None
pyqt5 : None

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateNumeric OperationsArithmetic, Comparison, and Logical operations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions