BUG: Timedelta.total_seconds method is returning wrong values in nanosecond intervals #46819
Open
3 tasks done
Labels
Bug
Regression
Functionality that used to work in a prior pandas version
Timedelta
Timedelta data type
Milestone
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
The
total_seconds
method from theTimedelta
class has an unexpected behavior on Pandas 1.4.2, since Pandas 1.0.5.For a small difference in nanoseconds scale the number of seconds on the interval returns 0,
Expected Behavior
The expected behavior is like what happens in Pandas 1.0.5, where:
Installed Versions
Python 3.8.4
Env w/ Pandas 1.4.2:
Env w/ Pandas 1.0.5:
The text was updated successfully, but these errors were encountered: