File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
187
187
pandas.show_versions \
188
188
pandas.test \
189
189
pandas.NaT \
190
- pandas.Timestamp.unit \
191
190
pandas.Timestamp.as_unit \
192
191
pandas.Timestamp.ctime \
193
192
pandas.Timestamp.date \
Original file line number Diff line number Diff line change @@ -236,6 +236,20 @@ cdef class _Timestamp(ABCTimestamp):
236
236
def unit (self ) -> str:
237
237
"""
238
238
The abbreviation associated with self._creso.
239
+
240
+ Examples
241
+ --------
242
+ >>> pd.Timestamp("2020-01-01 12:34:56").unit
243
+ 's'
244
+
245
+ >>> pd.Timestamp("2020-01-01 12:34:56.123").unit
246
+ 'ms'
247
+
248
+ >>> pd.Timestamp("2020-01-01 12:34:56.123456").unit
249
+ 'us'
250
+
251
+ >>> pd.Timestamp("2020-01-01 12:34:56.123456789").unit
252
+ 'ns'
239
253
"""
240
254
return npy_unit_to_abbrev(self._creso )
241
255
You can’t perform that action at this time.
0 commit comments