diff --git a/pandas/_libs/tslib.pyx b/pandas/_libs/tslib.pyx index 50e0b77c6d3a0..bd0d0fe5559d3 100644 --- a/pandas/_libs/tslib.pyx +++ b/pandas/_libs/tslib.pyx @@ -858,6 +858,9 @@ class NaTType(_NaT): return (__nat_unpickle, (None, )) def total_seconds(self): + """ + Total duration of timedelta in seconds (to ns precision) + """ # GH 10939 return np.nan @@ -3892,8 +3895,9 @@ for field in fields: _nat_methods = ['date', 'now', 'replace', 'to_pydatetime', 'today', 'round', 'floor', 'ceil', 'tz_convert', 'tz_localize'] -_nan_methods = ['weekday', 'isoweekday', 'total_seconds'] -_implemented_methods = ['to_datetime', 'to_datetime64', 'isoformat'] +_nan_methods = ['weekday', 'isoweekday'] +_implemented_methods = [ + 'to_datetime', 'to_datetime64', 'isoformat', 'total_seconds'] _implemented_methods.extend(_nat_methods) _implemented_methods.extend(_nan_methods)