Skip to content

Commit eb26f35

Browse files
committed
Add unit property to Timestamp
1 parent 831d184 commit eb26f35

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

pandas-stubs/_libs/tslibs/timestamps.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,3 +310,5 @@ class Timestamp(datetime):
310310
def days_in_month(self) -> int: ...
311311
@property
312312
def daysinmonth(self) -> int: ...
313+
@property
314+
def unit(self) -> str: ...

tests/test_scalars.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,6 +1189,7 @@ def test_timestamp_properties() -> None:
11891189
check(assert_type(ts.tzinfo, Optional[dt.tzinfo]), type(None))
11901190
check(assert_type(ts.value, int), int)
11911191
check(assert_type(ts.year, int), int)
1192+
check(assert_type(ts.unit, str), str)
11921193

11931194

11941195
def test_timestamp_add_sub() -> None:

0 commit comments

Comments
 (0)