Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions partial/pandas/core/indexes/datetimes.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import numpy as np
from datetime import tzinfo as tzinfo
from pandas.core.indexes.datetimelike import DatetimeTimedeltaMixin as DatetimeTimedeltaMixin, DatetimelikeDelegateMixin as DatetimelikeDelegateMixin
from typing import Optional

class DatetimeDelegateMixin(DatetimelikeDelegateMixin): ...

class DatetimeIndex(DatetimeTimedeltaMixin, DatetimeDelegateMixin):
tz: Optional[tzinfo]
def __init__(self, data = ..., freq = ..., tz = ..., normalize: bool = ..., closed = ..., ambiguous: str = ..., dayfirst: bool = ..., yearfirst: bool = ..., dtype = ..., copy: bool = ..., name = ...): ...
def __array__(self, dtype=...) -> np.ndarray: ...
def __reduce__(self): ...
def union_many(self, others): ...
def to_series(self, keep_tz = ..., index = ..., name = ...): ...
def snap(self, freq: str = ...): ...
def get_value(self, series, key): ...
def get_value_maybe_box(self, series, key): ...
def get_loc(self, key, method = ..., tolerance = ...): ...
def slice_indexer(self, start = ..., end = ..., step = ..., kind = ...): ...
def searchsorted(self, value, side: str = ..., sorter = ...): ...
def is_type_compatible(self, typ) -> bool: ...
@property
def inferred_type(self) -> str: ...
def insert(self, loc, item): ...
def indexer_at_time(self, time, asof: bool = ...): ...
def indexer_between_time(self, start_time, end_time, include_start: bool = ..., include_end: bool = ...): ...
def strftime(self, date_format: str = ...) -> np.ndarray: ...

def date_range(start=..., end=..., periods=..., freq=..., tz=..., normalize=..., name=..., closed=..., **kwargs) -> DatetimeIndex: ...
def bdate_range(
start = ...,
end = ...,
periods = ...,
freq: str = ...,
tz = ...,
normalize: bool = ...,
name = ...,
weekmask = ...,
holidays = ...,
closed = ...,
) -> DatetimeIndex: ...
40 changes: 40 additions & 0 deletions partial/pandas/core/indexes/numeric.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import numpy as np
from pandas.core.indexes.base import Index as Index
from typing import Iterable, TypeVar

_T = TypeVar("_T", str, int)

class NumericIndex(Index[_T]):
def __init__(self, data: Iterable = ..., dtype = ..., copy: bool = ..., name = ...): ...
@property
def is_all_dates(self) -> bool: ...
def insert(self, loc, item): ...

class IntegerIndex(NumericIndex[_T]):
def __contains__(self, key) -> bool: ...

class Int64Index(IntegerIndex[np.int64]):
__doc__ = ...
@property
def inferred_type(self) -> str: ...
@property
def asi8(self) -> np.ndarray: ...

class UInt64Index(IntegerIndex[np.uint64]):
__doc__ = ...
@property
def inferred_type(self) -> str: ...
@property
def asi8(self) -> np.ndarray: ...

class Float64Index(NumericIndex[np.float64]):
__doc__ = ...
@property
def inferred_type(self) -> str: ...
def astype(self, dtype, copy: bool = ...): ...
def get_value(self, series, key): ...
def equals(self, other) -> bool: ...
def __contains__(self, other) -> bool: ...
def get_loc(self, key, method = ..., tolerance = ...): ...
def is_unique(self) -> bool: ...
def isin(self, values, level = ...): ...
2 changes: 1 addition & 1 deletion partial/pandas/core/series.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
level: Optional[Level] = ...,
fill_value: Optional[float] = ...,
axis: Optional[SeriesAxisType] = ...,
) -> Series[S1]:: ...
) -> Series[S1]: ...
def sum(
self,
axis: Optional[SeriesAxisType] = ...,
Expand Down