Skip to content

Conversation

@Dr-Irv
Copy link
Collaborator

@Dr-Irv Dr-Irv commented May 1, 2023

Had a little time so closed out a few "good first issues"

@Dr-Irv Dr-Irv requested a review from twoertwein May 1, 2023 23:00
end: _TimestampLike = ...,
periods: int | None = ...,
freq: str | BaseOffset | None = ...,
freq: str | BaseOffset | pd.Timedelta | dt.timedelta | None = ...,
Copy link
Member

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 of datetime.timedelta? Could simplify this union (or keep, if it is more explicit).

Copy link
Collaborator Author

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 that dt.timedelta is accepted.

| list[str]
| slice
| _IndexSliceTuple
| Callable,
Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. We have it this way in DataFrame.loc as well.

@twoertwein twoertwein merged commit 6c0eed6 into pandas-dev:main May 2, 2023
@twoertwein
Copy link
Member

Thanks @Dr-Irv !

@Dr-Irv Dr-Irv deleted the manyfirst branch December 2, 2024 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants