Skip to content

Commit 04d3913

Browse files
committed
Added docs to min/max/resolution
1 parent ddd0aa8 commit 04d3913

File tree

1 file changed

+71
-3
lines changed

1 file changed

+71
-3
lines changed

pandas/_libs/tslibs/timedeltas.pyx

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,9 +1033,77 @@ cdef class _Timedelta(timedelta):
10331033

10341034
# higher than np.ndarray and np.matrix
10351035
__array_priority__ = 100
1036-
min = MinMaxReso("min")
1037-
max = MinMaxReso("max")
1038-
resolution = MinMaxReso("resolution")
1036+
1037+
@property
1038+
def min(self):
1039+
"""
1040+
Returns the minimum bound possible for Timedelta.
1041+
1042+
Returns the smallest possible value represented by 64 bits.
1043+
1044+
Returns
1045+
-------
1046+
int
1047+
1048+
See Also
1049+
--------
1050+
Timedelta.max: Returns the maximum bound possible for Timedelta.
1051+
Timedelta.resolution: Returns the smallest possible difference between
1052+
non-equal Timedelta objects.
1053+
1054+
Examples
1055+
--------
1056+
>>> pd.Timedelta.min
1057+
-9223372036854775807
1058+
"""
1059+
return MinMaxReso("min")
1060+
1061+
@property
1062+
def max(self):
1063+
"""
1064+
Returns the maximum bound possible for Timedelta.
1065+
1066+
Returns the largest possible value represented by 64 bits.
1067+
1068+
Returns
1069+
-------
1070+
int
1071+
1072+
See Also
1073+
--------
1074+
Timedelta.min: Returns the minimum bound possible for Timedelta.
1075+
Timedelta.resolution: Returns the smallest possible difference between
1076+
non-equal Timedelta objects.
1077+
1078+
Examples
1079+
--------
1080+
>>> pd.Timedelta.max
1081+
9223372036854775807
1082+
"""
1083+
return MinMaxReso("max")
1084+
1085+
@property
1086+
def resolution(self):
1087+
"""
1088+
Returns the smalleset possible difference between non-equal Timedelta objects.
1089+
1090+
Returns the integer 1.
1091+
1092+
Returns
1093+
-------
1094+
int
1095+
1096+
See Also
1097+
--------
1098+
Timedelta.max: Returns the maximum bound possible for Timedelta.
1099+
Timedelta.min: Returns the minimum bound possible for Timedelta.
1100+
1101+
Examples
1102+
--------
1103+
>>> pd.Timedelta.resolution
1104+
1
1105+
"""
1106+
return MinMaxReso("resolution")
10391107

10401108
@property
10411109
def value(self):

0 commit comments

Comments
 (0)