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/9185 below:

restore timedelta compability for Timedelta components? · Issue #9185 · pandas-dev/pandas · GitHub

With the new Timedelta type (see #8184), we introduced behavior that breaks compatibility with the superclass timedelta: td.seconds refers to seconds since the last minute, rather than seconds since the last day (as in the superclass).

I think breaking compatibility with the superclass here was a mistake. User code clearly does rely on the old behavior, e.g., as manifested in bugs for exporting datetime columns to Excel: #9139. Moreover, it's likely to remain an issue causing silent bugs, because external libraries are going to continue to use isinstance checks to verify that something is a datetime/timedelta object. We chose to subclass timedelta here, so we really are stuck with full API compatibility.

So I think we should make this change in 0.16. It's a breaking change, but 0.15 was already a breaking change in this respect, and in any case I think we should give ourselves some allowance for API changes for new types.

CC @jorisvandenbossche @jreback


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