DEPR: deprecate dates-with-datetime64 in _maybe_downcast_for_indexing#64871
Merged
Conversation
7c6a35d to
eefc775
Compare
2 tasks
eefc775 to
eece8bc
Compare
Member
Author
|
Discussed on today's dev call and everyone was on board. |
eece8bc to
3c42a7a
Compare
3c42a7a to
8184235
Compare
Deprecate the special case in Index._maybe_downcast_for_indexing that implicitly converts sequences of datetime.date objects to DatetimeIndex when joining or indexing. This affects join, alignment, and get_indexer fallback paths where _maybe_cast_listlike_indexer does not handle the conversion. closes pandas-dev#62158 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8184235 to
49587e8
Compare
mroeschke
approved these changes
Apr 10, 2026
Member
|
Thanks @jbrockmendel |
Sharl0tteIsTaken
added a commit
to Sharl0tteIsTaken/pandas
that referenced
this pull request
Apr 12, 2026
…-comparison * upstream/main: PERF: use lookup instead of hash_inner_join for merge with unique right keys (pandas-dev#64691) BUG : update `SeriesGroupBy.ohlc()` to honor `as_index=False` (pandas-dev#65141) PERF: Use DataFrame-level reductions in DataFrame.agg with list of funcs (pandas-dev#65031) DOC: document required external libraries in read_* I/O docstrings (pandas-dev#65143) DOC: improve MultiIndex.is_monotonic_increasing/decreasing docstrings (pandas-dev#65154) BUG: Raise ValueError for non-boolean numeric_only in DataFrame/Series reductions (GH#53098) (pandas-dev#65131) BUG: Timedelta.round() raises ZeroDivisionError when internal unit is 's' and target frequency is sub-second (pandas-dev#64836) ENH: Add replace method to Index (closes pandas-dev#19495) (pandas-dev#65099) PERF: improve StringArray.isna (pandas-dev#57733) BUG: read parquet files with older pytz (DEP: keep lower pytz minimum version) (pandas-dev#65133) DEPR: deprecate dates-with-datetime64 in _maybe_downcast_for_indexing (pandas-dev#64871) DOC: note that DataFrame.values is not writeable (pandas-dev#65142) CLN: Update groupby observed defaults (pandas-dev#65148) PERF: avoid materializing values[indexer] in Block.setitem (pandas-dev#64251) DOC: update GroupBy.sum/min/max See Also sections (pandas-dev#65144)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Index._maybe_downcast_for_indexingthat implicitly converts sequences ofdatetime.dateobjects toDatetimeIndexwhen joining or indexingjoin, alignment, andget_indexerfallback (when_maybe_cast_listlike_indexerreturns object dtype, e.g. mixed date/Timestamp lists)_infer_matchespath (coveringequalsand the primary_maybe_cast_listlike_indexerconversion for pure date-object targets) will be handled in a separate PRcloses #62158
Test plan
Pandas4WarningDatetimeIndex.joinwith date-object Index🤖 Generated with Claude Code