Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Enforce Numpy Docstring Validation (Issue #59458) #59590

Merged
merged 2 commits into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,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.day GL08" \
-i "pandas.Timestamp.fold GL08" \
-i "pandas.Timestamp.hour GL08" \
-i "pandas.Timestamp.max PR02" \
Expand Down
23 changes: 23 additions & 0 deletions pandas/_libs/tslibs/timestamps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,29 @@ cdef class _Timestamp(ABCTimestamp):
"""
return ((self.month - 1) // 3) + 1

@property
def day(self) -> int:
"""
Return the day of the Timestamp.

Returns
-------
int
The day of the Timestamp.

See Also
--------
Timestamp.week : Return the week number of the year.
Timestamp.weekday : Return the day of the week.

Examples
--------
>>> ts = pd.Timestamp("2024-08-31 16:16:30")
>>> ts.day
31
"""
return super().day

@property
def week(self) -> int:
"""
Expand Down
Loading