Skip to content

Commit 7b18368

Browse files
committed
add value docstring
1 parent 6aeb19a commit 7b18368

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
130130
-i "pandas.Timestamp.min PR02" \
131131
-i "pandas.Timestamp.resolution PR02" \
132132
-i "pandas.Timestamp.tzinfo GL08" \
133-
-i "pandas.Timestamp.value GL08" \
134133
-i "pandas.api.extensions.ExtensionArray.interpolate PR01,SA01" \
135134
-i "pandas.api.interchange.from_dataframe RT03,SA01" \
136135
-i "pandas.api.types.is_bool PR01,SA01" \

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,30 @@ cdef class _Timestamp(ABCTimestamp):
11691169
"""
11701170
return super().nanosecond
11711171
1172+
@property
1173+
def value(self) -> int:
1174+
"""
1175+
Return the value of the Timestamp.
1176+
1177+
Returns
1178+
-------
1179+
int
1180+
The integer representation of the Timestamp object in nanoseconds
1181+
since the Unix epoch (1970-01-01 00:00:00 UTC).
1182+
1183+
See Also
1184+
--------
1185+
Timestamp.second : Return the second of the Timestamp.
1186+
Timestamp.minute : Return the minute of the Timestamp.
1187+
1188+
Examples
1189+
--------
1190+
>>> ts = pd.Timestamp("2024-08-31 16:16:30")
1191+
>>> ts.value
1192+
1725120990000000000
1193+
"""
1194+
return super().value
1195+
11721196
@property
11731197
def week(self) -> int:
11741198
"""

0 commit comments

Comments
 (0)