Skip to content

Commit 6a4670e

Browse files
committed
TYP: Add Literal annotations to TimeGrouper
1 parent c90294d commit 6a4670e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pandas/core/resample.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1470,14 +1470,14 @@ def __init__(
14701470
self,
14711471
freq="Min",
14721472
closed: Literal["left", "right"] | None = None,
1473-
label: str | None = None,
1473+
label: Literal["left", "right"] | None = None,
14741474
how="mean",
14751475
axis=0,
14761476
fill_method=None,
14771477
limit=None,
14781478
loffset=None,
14791479
kind: str | None = None,
1480-
convention: str | None = None,
1480+
convention: Literal["start", "end", "e", "s"] | None = None,
14811481
base: int | None = None,
14821482
origin: str | TimestampConvertibleTypes = "start_day",
14831483
offset: TimedeltaConvertibleTypes | None = None,
@@ -1524,8 +1524,7 @@ def __init__(
15241524
self.label = label
15251525
self.kind = kind
15261526

1527-
self.convention = convention or "E"
1528-
self.convention = self.convention.lower()
1527+
self.convention = convention or "e"
15291528

15301529
self.how = how
15311530
self.fill_method = fill_method

0 commit comments

Comments
 (0)