We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37e6239 commit ece009eCopy full SHA for ece009e
pandas/core/tools/datetimes.py
@@ -227,7 +227,11 @@ def _maybe_cache(
227
unique_dates = unique(arg)
228
if len(unique_dates) < len(arg):
229
cache_dates = convert_listlike(unique_dates, format)
230
- cache_array = Series(cache_dates, index=unique_dates)
+ # GH#45319
231
+ try:
232
+ cache_array = Series(cache_dates, index=unique_dates)
233
+ except OutOfBoundsDatetime:
234
+ pass
235
# GH#39882 and GH#35888 in case of None and NaT we get duplicates
236
if not cache_array.index.is_unique:
237
cache_array = cache_array[~cache_array.index.duplicated()]
0 commit comments