Skip to content

Commit b507379

Browse files
committed
Dont re-pin total_seconds as it is already implemented (pandas-dev#17432)
1 parent 708e4e6 commit b507379

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pandas/_libs/tslib.pyx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,9 @@ class NaTType(_NaT):
858858
return (__nat_unpickle, (None, ))
859859

860860
def total_seconds(self):
861+
"""
862+
Total duration of timedelta in seconds (to ns precision)
863+
"""
861864
# GH 10939
862865
return np.nan
863866

@@ -3890,8 +3893,9 @@ for field in fields:
38903893
_nat_methods = ['date', 'now', 'replace', 'to_pydatetime',
38913894
'today', 'round', 'floor', 'ceil', 'tz_convert',
38923895
'tz_localize']
3893-
_nan_methods = ['weekday', 'isoweekday', 'total_seconds']
3894-
_implemented_methods = ['to_datetime', 'to_datetime64', 'isoformat']
3896+
_nan_methods = ['weekday', 'isoweekday']
3897+
_implemented_methods = [
3898+
'to_datetime', 'to_datetime64', 'isoformat', 'total_seconds']
38953899
_implemented_methods.extend(_nat_methods)
38963900
_implemented_methods.extend(_nan_methods)
38973901

0 commit comments

Comments
 (0)