File tree Expand file tree Collapse file tree 2 files changed +48
-4
lines changed Expand file tree Collapse file tree 2 files changed +48
-4
lines changed Original file line number Diff line number Diff line change @@ -128,11 +128,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
128
128
-i " pandas.TimedeltaIndex.to_pytimedelta RT03,SA01" \
129
129
-i " pandas.Timestamp.max PR02" \
130
130
-i " pandas.Timestamp.min PR02" \
131
- -i " pandas.Timestamp.nanosecond GL08" \
132
131
-i " pandas.Timestamp.resolution PR02" \
133
132
-i " pandas.Timestamp.tzinfo GL08" \
134
133
-i " pandas.Timestamp.value GL08" \
135
- -i " pandas.Timestamp.year GL08" \
136
134
-i " pandas.api.extensions.ExtensionArray.interpolate PR01,SA01" \
137
135
-i " pandas.api.interchange.from_dataframe RT03,SA01" \
138
136
-i " pandas.api.types.is_bool PR01,SA01" \
Original file line number Diff line number Diff line change @@ -1008,6 +1008,29 @@ cdef class _Timestamp(ABCTimestamp):
1008
1008
"""
1009
1009
return super().fold
1010
1010
1011
+ @property
1012
+ def year(self) -> int:
1013
+ """
1014
+ Return the year of the Timestamp.
1015
+
1016
+ Returns
1017
+ -------
1018
+ int
1019
+ The year of the Timestamp.
1020
+
1021
+ See Also
1022
+ --------
1023
+ Timestamp.month : Return the month of the Timestamp.
1024
+ Timestamp.day : Return the day of the Timestamp.
1025
+
1026
+ Examples
1027
+ --------
1028
+ >>> ts = pd.Timestamp(" 2024-08-31 16:16:30" )
1029
+ >>> ts.year
1030
+ 2024
1031
+ """
1032
+ return super().year
1033
+
1011
1034
@property
1012
1035
def month(self) -> int:
1013
1036
"""
@@ -1020,8 +1043,8 @@ cdef class _Timestamp(ABCTimestamp):
1020
1043
1021
1044
See Also
1022
1045
--------
1023
- Timestamp.day : Return the day of the year .
1024
- Timestamp.year : Return the year of the week .
1046
+ Timestamp.day : Return the day of the Timestamp .
1047
+ Timestamp.year : Return the year of the Timestamp .
1025
1048
1026
1049
Examples
1027
1050
--------
@@ -1123,6 +1146,29 @@ cdef class _Timestamp(ABCTimestamp):
1123
1146
"""
1124
1147
return super().microsecond
1125
1148
1149
+ @property
1150
+ def nanosecond(self) -> int:
1151
+ """
1152
+ Return the nanosecond of the Timestamp.
1153
+
1154
+ Returns
1155
+ -------
1156
+ int
1157
+ The nanosecond of the Timestamp.
1158
+
1159
+ See Also
1160
+ --------
1161
+ Timestamp.second : Return the second of the Timestamp.
1162
+ Timestamp.microsecond : Return the microsecond of the Timestamp.
1163
+
1164
+ Examples
1165
+ --------
1166
+ >>> ts = pd.Timestamp(" 2024-08-31 16:16:30.230400015" )
1167
+ >>> ts.nanosecond
1168
+ 15
1169
+ """
1170
+ return super().nanosecond
1171
+
1126
1172
@property
1127
1173
def week(self) -> int:
1128
1174
"""
You can’t perform that action at this time.
0 commit comments