Skip to content

Commit 42a8b76

Browse files
committed
Removed restriction on using fill_value with series
Updated docs
1 parent 32a0f77 commit 42a8b76

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,7 @@ MultiIndex
998998
- :func:`MultiIndex.get_level_values` accessing a :class:`DatetimeIndex` does not carry the frequency attribute along (:issue:`58327`, :issue:`57949`)
999999
- Bug in :class:`DataFrame` arithmetic operations in case of unaligned MultiIndex columns (:issue:`60498`)
10001000
- Bug in :class:`DataFrame` arithmetic operations with :class:`Series` in case of unaligned MultiIndex (:issue:`61009`)
1001+
- Bug in :class:`DataFrame` arithmetic operations with :class:`Series` now works with ``fill_value`` parameter (:issue:`61581`)
10011002
- Bug in :meth:`MultiIndex.from_tuples` causing wrong output with input of type tuples having NaN values (:issue:`60695`, :issue:`60988`)
10021003
- Bug in :meth:`DataFrame.__setitem__` where column alignment logic would reindex the assigned value with an empty index, incorrectly setting all values to ``NaN``.(:issue:`61841`)
10031004
- Bug in :meth:`DataFrame.reindex` and :meth:`Series.reindex` where reindexing :class:`Index` to a :class:`MultiIndex` would incorrectly set all values to ``NaN``.(:issue:`60923`)

pandas/core/frame.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8498,11 +8498,6 @@ def _flex_arith_method(
84988498
if self._should_reindex_frame_op(other, op, axis, fill_value, level):
84998499
return self._arith_method_with_reindex(other, op)
85008500

8501-
if isinstance(other, Series) and fill_value is not None:
8502-
# TODO: We could allow this in cases where we end up going
8503-
# through the DataFrame path
8504-
raise NotImplementedError(f"fill_value {fill_value} not supported.")
8505-
85068501
other = ops.maybe_prepare_scalar_for_op(other, self.shape)
85078502
self, other = self._align_for_op(other, axis, flex=True, level=level)
85088503

0 commit comments

Comments
 (0)