From 8f4beab2942fd93cb15d11a8dc7266d15fba7052 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Fri, 3 May 2024 19:09:16 +0530 Subject: [PATCH 1/3] DOC: add PR07,SA01 for pandas.Timestamp --- pandas/_libs/tslibs/timestamps.pyx | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index d2468efd9783d..c7bf11ea75fb4 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -1291,10 +1291,24 @@ class Timestamp(_Timestamp): ---------- ts_input : datetime-like, str, int, float Value to be converted to Timestamp. - year, month, day : int - hour, minute, second, microsecond : int, optional, default 0 + year : int + Value of year. + month : int + Value of month. + day : int + Value of day. + hour : int, optional, default 0 + Value of hour. + minute : int, optional, default 0 + Value of minute. + second : int, optional, default 0 + Value of second. + microsecond : int, optional, default 0 + Value of microsecond. tzinfo : datetime.tzinfo, optional, default None + Timezone info. nanosecond : int, optional, default 0 + Value of nanosecond. tz : str, pytz.timezone, dateutil.tz.tzfile or None Time zone for time which Timestamp will have. unit : str @@ -1310,6 +1324,11 @@ class Timestamp(_Timestamp): datetime-like corresponds to the first (0) or the second time (1) the wall clock hits the ambiguous time. + See Also + -------- + Timedelta : Represents a duration, the difference between two dates or times. + datetime.datetime : Python datetime.datetime object. + Notes ----- There are essentially three calling conventions for the constructor. The From 23814bd1bce7d19eb24b10684541010de4d83c9a Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Fri, 3 May 2024 19:09:36 +0530 Subject: [PATCH 2/3] DOC: remove PR07,SA01 for pandas.Timestamp --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 49410fec36619..e79de4311233a 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -309,7 +309,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.TimedeltaIndex.nanoseconds SA01" \ -i "pandas.TimedeltaIndex.seconds SA01" \ -i "pandas.TimedeltaIndex.to_pytimedelta RT03,SA01" \ - -i "pandas.Timestamp PR07,SA01" \ -i "pandas.Timestamp.as_unit SA01" \ -i "pandas.Timestamp.asm8 SA01" \ -i "pandas.Timestamp.astimezone SA01" \ From a542817b94e4eb6d550899496271bdbfedec5480 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Fri, 3 May 2024 20:55:31 +0530 Subject: [PATCH 3/3] DOC: remove PR07,SA01 for pandas.Timestamp min and max --- ci/code_checks.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index e79de4311233a..27e5827fdf255 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -329,9 +329,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Timestamp.isocalendar SA01" \ -i "pandas.Timestamp.isoformat SA01" \ -i "pandas.Timestamp.isoweekday SA01" \ - -i "pandas.Timestamp.max PR02,PR07,SA01" \ + -i "pandas.Timestamp.max PR02" \ -i "pandas.Timestamp.microsecond GL08" \ - -i "pandas.Timestamp.min PR02,PR07,SA01" \ + -i "pandas.Timestamp.min PR02" \ -i "pandas.Timestamp.minute GL08" \ -i "pandas.Timestamp.month GL08" \ -i "pandas.Timestamp.month_name SA01" \