From a70a7c10ab0d250130483e660c06c2d6fd3a56d9 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Wed, 8 May 2024 10:29:41 +0530 Subject: [PATCH 1/3] DOC: add SA01 pandas.Timestamp.utcnow --- pandas/_libs/tslibs/timestamps.pyx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index c1b615839c8cc..c61e7e43221c8 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -1452,6 +1452,18 @@ class Timestamp(_Timestamp): Return a new Timestamp representing UTC day and time. + See Also + -------- + Timestamp : Constructs an arbitrary datetime. + Timestamp.now : Return the current local date and time, which + can be timezone-aware. + Timestamp.today : Return the current local date and time with + timezone information set to None. + to_datetime : Convert argument to datetime. + date_range : Return a fixed frequency DatetimeIndex. + Timestamp.utctimetuple : Return UTC time tuple, compatible with + time.localtime(). + Examples -------- >>> pd.Timestamp.utcnow() # doctest: +SKIP From c83a47ef170842aab0e9a222650f44ef51afce36 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Wed, 8 May 2024 10:30:02 +0530 Subject: [PATCH 2/3] DOC: remove SA01 pandas.Timestamp.utcnow --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index f34f0690196ed..1f49c2e02b8e4 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -333,7 +333,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Timestamp.tzname SA01" \ -i "pandas.Timestamp.unit SA01" \ -i "pandas.Timestamp.utcfromtimestamp PR01,SA01" \ - -i "pandas.Timestamp.utcnow SA01" \ -i "pandas.Timestamp.utcoffset SA01" \ -i "pandas.Timestamp.utctimetuple SA01" \ -i "pandas.Timestamp.value GL08" \ From 4affeb1f854989d4108f495cff02a3b7c98d95b9 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Wed, 8 May 2024 13:04:09 +0530 Subject: [PATCH 3/3] DOC: add SA01 to nattype --- pandas/_libs/tslibs/nattype.pyx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pandas/_libs/tslibs/nattype.pyx b/pandas/_libs/tslibs/nattype.pyx index 0108fc8fb7eed..729333c1151c5 100644 --- a/pandas/_libs/tslibs/nattype.pyx +++ b/pandas/_libs/tslibs/nattype.pyx @@ -769,6 +769,18 @@ class NaTType(_NaT): Return a new Timestamp representing UTC day and time. + See Also + -------- + Timestamp : Constructs an arbitrary datetime. + Timestamp.now : Return the current local date and time, which + can be timezone-aware. + Timestamp.today : Return the current local date and time with + timezone information set to None. + to_datetime : Convert argument to datetime. + date_range : Return a fixed frequency DatetimeIndex. + Timestamp.utctimetuple : Return UTC time tuple, compatible with + time.localtime(). + Examples -------- >>> pd.Timestamp.utcnow() # doctest: +SKIP