-
-
Notifications
You must be signed in to change notification settings - Fork 141
/
Copy pathdatetimelike.pyi
39 lines (36 loc) · 1.2 KB
/
datetimelike.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import numpy as np
from pandas.core.indexes.extension import ExtensionIndex
from pandas.core.indexes.timedeltas import TimedeltaIndex
from typing_extensions import Self
from pandas._libs.tslibs import BaseOffset
from pandas._typing import (
S1,
AxisIndex,
TimeUnit,
)
class DatetimeIndexOpsMixin(ExtensionIndex[S1]):
@property
def freq(self) -> BaseOffset | None: ...
@property
def freqstr(self) -> str | None: ...
@property
def is_all_dates(self) -> bool: ...
def min(
self, axis: AxisIndex | None = ..., skipna: bool = ..., *args, **kwargs
) -> S1: ...
def argmin(
self, axis: AxisIndex | None = ..., skipna: bool = ..., *args, **kwargs
) -> np.int64: ...
def max(
self, axis: AxisIndex | None = ..., skipna: bool = ..., *args, **kwargs
) -> S1: ...
def argmax(
self, axis: AxisIndex | None = ..., skipna: bool = ..., *args, **kwargs
) -> np.int64: ...
def __rsub__( # type: ignore[override]
self, other: DatetimeIndexOpsMixin
) -> TimedeltaIndex: ...
class DatetimeTimedeltaMixin(DatetimeIndexOpsMixin[S1]):
@property
def unit(self) -> TimeUnit: ...
def as_unit(self, unit: TimeUnit) -> Self: ...