-
-
Notifications
You must be signed in to change notification settings - Fork 141
close out a few first issues #670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,7 +179,13 @@ class _LocIndexerSeries(_LocIndexer, Generic[S1]): | |
@overload | ||
def __getitem__( | ||
self, | ||
idx: MaskType | Index | Sequence[float] | list[str] | slice | _IndexSliceTuple, | ||
idx: MaskType | ||
| Index | ||
| Sequence[float] | ||
| list[str] | ||
| slice | ||
| _IndexSliceTuple | ||
| Callable, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Happy to keep it as is - it is probably not worth to try to enumerate all allowed arguments/return values. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. We have it this way in |
||
# _IndexSliceTuple is when having a tuple that includes a slice. Could just | ||
# be s.loc[1, :], or s.loc[pd.IndexSlice[1, :]] | ||
) -> Series[S1]: ... | ||
|
@@ -775,7 +781,7 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]): | |
@overload | ||
def apply( | ||
self, | ||
func: Callable[..., Scalar | Sequence | set | Mapping], | ||
func: Callable[..., Scalar | Sequence | set | Mapping | None], | ||
convertDType: _bool = ..., | ||
args: tuple = ..., | ||
**kwds, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is
pd.Timedelta
a subclass ofdatetime.timedelta
? Could simplify this union (or keep, if it is more explicit).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is a subclass. We're inconsistent in the stubs. Some places we just say
pd.Timedelta
, others we have the union. I like the explicit aspect to make it clear thatdt.timedelta
is accepted.