diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index f80cb2e27cc23..281c6f3a700eb 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -1248,6 +1248,12 @@ class Timestamp(_Timestamp): nanosecond : int, optional, default 0 freq : str, DateOffset Offset which Timestamp will have. + + .. deprecated:: 1.3.0 + + The freq parameter of a Timestamp is deprecated and will be + removed in a future version. + tz : str, pytz.timezone, dateutil.tz.tzfile or None Time zone for time which Timestamp will have. unit : str @@ -1311,6 +1317,12 @@ class Timestamp(_Timestamp): Date corresponding to a proleptic Gregorian ordinal. freq : str, DateOffset Offset to apply to the Timestamp. + + .. deprecated:: 1.3.0 + + The freq parameter of a Timestamp is deprecated and will be + removed in a future version. + tz : str, pytz.timezone, dateutil.tz.tzfile or None Time zone for the Timestamp. diff --git a/pandas/tests/scalar/test_nat.py b/pandas/tests/scalar/test_nat.py index 79e9e1d4fc68b..1d3253f7fa551 100644 --- a/pandas/tests/scalar/test_nat.py +++ b/pandas/tests/scalar/test_nat.py @@ -321,8 +321,9 @@ def test_nat_doc_strings(compare): klass, method = compare klass_doc = getattr(klass, method).__doc__ - # Ignore differences with Timestamp.isoformat() as they're intentional - if klass == Timestamp and method == "isoformat": + # Ignore differences with Timestamp.isoformat() and Timestamp.fromordinal() + # as they're intentional + if klass == Timestamp and method in ("isoformat", "fromordinal"): return if method == "to_numpy":