Skip to content

Commit c0785ae

Browse files
tuhinsharma121pmhatre1
authored andcommitted
DOC: Enforce Numpy Docstring Validation for pandas.Timestamp (pandas-dev#58550)
* DOC: add PR07,SA01 for pandas.Timestamp * DOC: remove PR07,SA01 for pandas.Timestamp * DOC: remove PR07,SA01 for pandas.Timestamp min and max
1 parent 3320ef7 commit c0785ae

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

ci/code_checks.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
295295
-i "pandas.TimedeltaIndex.nanoseconds SA01" \
296296
-i "pandas.TimedeltaIndex.seconds SA01" \
297297
-i "pandas.TimedeltaIndex.to_pytimedelta RT03,SA01" \
298-
-i "pandas.Timestamp PR07,SA01" \
299298
-i "pandas.Timestamp.as_unit SA01" \
300299
-i "pandas.Timestamp.asm8 SA01" \
301300
-i "pandas.Timestamp.astimezone SA01" \
@@ -314,9 +313,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
314313
-i "pandas.Timestamp.isocalendar SA01" \
315314
-i "pandas.Timestamp.isoformat SA01" \
316315
-i "pandas.Timestamp.isoweekday SA01" \
317-
-i "pandas.Timestamp.max PR02,PR07,SA01" \
316+
-i "pandas.Timestamp.max PR02" \
318317
-i "pandas.Timestamp.microsecond GL08" \
319-
-i "pandas.Timestamp.min PR02,PR07,SA01" \
318+
-i "pandas.Timestamp.min PR02" \
320319
-i "pandas.Timestamp.minute GL08" \
321320
-i "pandas.Timestamp.month GL08" \
322321
-i "pandas.Timestamp.month_name SA01" \

pandas/_libs/tslibs/timestamps.pyx

+21-2
Original file line numberDiff line numberDiff line change
@@ -1297,10 +1297,24 @@ class Timestamp(_Timestamp):
12971297
----------
12981298
ts_input : datetime-like, str, int, float
12991299
Value to be converted to Timestamp.
1300-
year, month, day : int
1301-
hour, minute, second, microsecond : int, optional, default 0
1300+
year : int
1301+
Value of year.
1302+
month : int
1303+
Value of month.
1304+
day : int
1305+
Value of day.
1306+
hour : int, optional, default 0
1307+
Value of hour.
1308+
minute : int, optional, default 0
1309+
Value of minute.
1310+
second : int, optional, default 0
1311+
Value of second.
1312+
microsecond : int, optional, default 0
1313+
Value of microsecond.
13021314
tzinfo : datetime.tzinfo, optional, default None
1315+
Timezone info.
13031316
nanosecond : int, optional, default 0
1317+
Value of nanosecond.
13041318
tz : str, pytz.timezone, dateutil.tz.tzfile or None
13051319
Time zone for time which Timestamp will have.
13061320
unit : str
@@ -1316,6 +1330,11 @@ class Timestamp(_Timestamp):
13161330
datetime-like corresponds to the first (0) or the second time (1)
13171331
the wall clock hits the ambiguous time.
13181332
1333+
See Also
1334+
--------
1335+
Timedelta : Represents a duration, the difference between two dates or times.
1336+
datetime.datetime : Python datetime.datetime object.
1337+
13191338
Notes
13201339
-----
13211340
There are essentially three calling conventions for the constructor. The

0 commit comments

Comments
 (0)