A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/23598 below:

Deprecate casting of index of dates to DatetimeIndex · Issue #23598 · pandas-dev/pandas · GitHub

In [5]: index = pd.Index([pd.Timestamp('2001'), pd.Timestamp('2002')], dtype=object)

In [6]: pd.Series(1, index=index).index
Out[6]: DatetimeIndex(['2001-01-01', '2002-01-01'], dtype='datetime64[ns]', freq=None)

This was the root cause of #23591. Why are we doing that?

Note that this doesn't affect the case of index=[pd.Timestamp(...), pd.Timestamp(...)], as that would have previously been converted to a DatetimeIndex. It seems be only when you have an Index of datetimes.

I'm going through our test cases that hit this now.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4