Skip to content

Commit f79e684

Browse files
committed
GH ref
1 parent 3be1a58 commit f79e684

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,9 +737,9 @@ Other Deprecations
737737
- Deprecated allowing ``fill_value`` that cannot be held in the original dtype (excepting NA values for integer and bool dtypes) in :meth:`Series.shift` and :meth:`DataFrame.shift` (:issue:`53802`)
738738
- Deprecated backward-compatibility behavior for :meth:`DataFrame.select_dtypes` matching "str" dtype when ``np.object_`` is specified (:issue:`61916`)
739739
- Deprecated option "future.no_silent_downcasting", as it is no longer used. In a future version accessing this option will raise (:issue:`59502`)
740+
- Deprecated silent casting of non-datetime 'other' to datetime in :meth:`Series.combine_first` (:issue:`62931`)
740741
- Deprecated slicing on a :class:`Series` or :class:`DataFrame` with a :class:`DatetimeIndex` using a ``datetime.date`` object, explicitly cast to :class:`Timestamp` instead (:issue:`35830`)
741742
- Deprecated the 'inplace' keyword from :meth:`Resampler.interpolate`, as passing ``True`` raises ``AttributeError`` (:issue:`58690`)
742-
- Deprecated silent casting of non-datetime 'other' to datetime in :meth:`Series.combine_first` (:issue:`??`)
743743

744744
.. ---------------------------------------------------------------------------
745745
.. _whatsnew_300.prior_deprecations:

pandas/core/series.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3272,6 +3272,7 @@ def combine_first(self, other) -> Series:
32723272
# TODO: try to match resos?
32733273
other = to_datetime(other)
32743274
warnings.warn(
3275+
# GH#62931
32753276
"Silently casting non-datetime 'other' to datetime in "
32763277
"Series.combine_first is deprecated and will be removed "
32773278
"in a future version. Explicitly cast before calling "

pandas/tests/series/methods/test_combine_first.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def test_combine_first_dt64(self, unit):
7878
tm.assert_series_equal(rs, xp)
7979

8080
def test_combine_first_dt64_casting_deprecation(self, unit):
81+
# GH#62931
8182
s0 = to_datetime(Series(["2010", np.nan])).dt.as_unit(unit)
8283
s1 = Series([np.nan, "2011"])
8384

0 commit comments

Comments
 (0)