Skip to content

Commit c4eab08

Browse files
committed
Fix min, max, resolution of Timedelta
1 parent 9a015d1 commit c4eab08

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7676
-i "pandas.Series.dt.freq GL08" \
7777
-i "pandas.Series.dt.unit GL08" \
7878
-i "pandas.Series.pad PR01,SA01" \
79-
-i "pandas.Timedelta.max PR02" \
80-
-i "pandas.Timedelta.min PR02" \
81-
-i "pandas.Timedelta.resolution PR02" \
8279
-i "pandas.Timestamp.max PR02" \
8380
-i "pandas.Timestamp.min PR02" \
8481
-i "pandas.Timestamp.nanosecond GL08" \

pandas/_libs/tslibs/timedeltas.pyx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1893,6 +1893,21 @@ class Timedelta(_Timedelta):
18931893
Values for construction in compat with datetime.timedelta.
18941894
Numpy ints and floats will be coerced to python ints and floats.
18951895
1896+
Attributes
1897+
----------
1898+
resolution: Timedelta
1899+
Represents the smallest difference between two time units that can be
1900+
represented by the Timedelta object.
1901+
Fixed at 0 days 00:00:00.000000001 (1 nanosecond).
1902+
min : Timedelta
1903+
Returns the minimum Timedelta value that can be created or used in
1904+
pandas operations.
1905+
Fixed at -106752 days +00:12:43.145224193
1906+
max : Timedelta
1907+
Returns the maximum Timedelta value that can be created or used in
1908+
pandas operations.
1909+
Fixed at 106751 days 23:47:16.854775807.
1910+
18961911
See Also
18971912
--------
18981913
Timestamp : Represents a single timestamp in time.

0 commit comments

Comments
 (0)