Skip to content

Commit 6ffb748

Browse files
jbrockmendelNo-Stream
authored andcommitted
Dont re-pin total_seconds as it is already implemented (pandas-dev#17432)
1 parent d8e01c4 commit 6ffb748

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pandas/_libs/tslib.pyx

+6-2
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,9 @@ class NaTType(_NaT):
856856
return (__nat_unpickle, (None, ))
857857

858858
def total_seconds(self):
859+
"""
860+
Total duration of timedelta in seconds (to ns precision)
861+
"""
859862
# GH 10939
860863
return np.nan
861864

@@ -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)