@@ -1342,7 +1342,17 @@ cdef class _Timestamp(ABCTimestamp):
1342
1342
1343
1343
cpdef to_datetime64(self):
1344
1344
"""
1345
- Return a numpy.datetime64 object with same precision.
1345
+ Return a NumPy datetime64 object with same precision.
1346
+
1347
+ This method returns a numpy.datetime64 object with the same
1348
+ date and time information and precision as the pd.Timestamp object .
1349
+
1350
+ See Also
1351
+ --------
1352
+ numpy.datetime64 : Class to represent dates and times with high precision.
1353
+ Timestamp.to_numpy : Alias for this method.
1354
+ Timestamp.asm8 : Alias for this method.
1355
+ pd.to_datetime : Convert argument to datetime.
1346
1356
1347
1357
Examples
1348
1358
--------
@@ -2093,6 +2103,19 @@ class Timestamp(_Timestamp):
2093
2103
"""
2094
2104
Return time object with same time and tzinfo.
2095
2105
2106
+ This method returns a datetime.time object with
2107
+ the time and tzinfo corresponding to the pd.Timestamp
2108
+ object , ignoring any information about the day/ date.
2109
+
2110
+ See Also
2111
+ --------
2112
+ datetime.datetime.timetz : Return datetime.time object with the
2113
+ same time attributes as the datetime object .
2114
+ datetime.time : Class to represent the time of day, independent
2115
+ of any particular day.
2116
+ datetime.datetime.tzinfo : Attribute of datetime.datetime objects
2117
+ representing the timezone of the datetime object .
2118
+
2096
2119
Examples
2097
2120
--------
2098
2121
>>> ts = pd.Timestamp(' 2023-01-01 10:00:00' , tz = ' Europe/Brussels' )
@@ -2141,9 +2164,27 @@ class Timestamp(_Timestamp):
2141
2164
@classmethod
2142
2165
def strptime(cls, date_string, format):
2143
2166
"""
2144
- Timestamp.strptime( string, format)
2167
+ Convert string argument to datetime.
2145
2168
2146
- Function is not implemented. Use pd.to_datetime().
2169
+ This method is not implemented; calling it will raise NotImplementedError .
2170
+ Use pd.to_datetime() instead.
2171
+
2172
+ Parameters
2173
+ ----------
2174
+ date_string : str
2175
+ String to convert to a datetime.
2176
+ format : str , default None
2177
+ The format string to parse time, e.g. " %d /%m /%Y " .
2178
+
2179
+ See Also
2180
+ --------
2181
+ pd.to_datetime : Convert argument to datetime.
2182
+ datetime.datetime.strptime : Return a datetime corresponding to a string
2183
+ representing a date and time, parsed according to a separate
2184
+ format string.
2185
+ datetime.datetime.strftime : Return a string representing the date and
2186
+ time, controlled by an explicit format string.
2187
+ Timestamp.isoformat : Return the time formatted according to ISO 8601.
2147
2188
2148
2189
Examples
2149
2190
--------
@@ -3073,7 +3114,8 @@ default 'raise'
3073
3114
"""
3074
3115
Convert TimeStamp to a Julian Date.
3075
3116
3076
- 0 Julian date is noon January 1 , 4713 BC.
3117
+ This method returns the number of days as a float since
3118
+ 0 Julian date, which is noon January 1 , 4713 BC.
3077
3119
3078
3120
See Also
3079
3121
--------
0 commit comments