-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Series.mode with dt64tz or PeriodDtype #44582
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
Conversation
pandas/core/arrays/datetimelike.py
Outdated
# type, _SupportsDType, str, Union[Tuple[Any, int], Tuple[Any, Union[int, | ||
# Sequence[int]]], List[Any], _DTypeDict, Tuple[Any, Any]]]" | ||
return self._ndarray.view(dtype=dtype) # type: ignore[return-value,arg-type] | ||
return super().view(dtype) |
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.
can you remove this entirely (since it will just user the super view anyhow)?
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.
not with the @overload
s just above this
assert res.dtype == ser.dtype | ||
tm.assert_series_equal(res, ser) | ||
|
||
res = pd.core.algorithms.mode(ser._values) |
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.
don't we have a rule which prevents this? e.g. can you import at the top instead
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.
not sure about the rule. will move the import
i ithink this needs a rebase as merged the underlying PR |
Rebased +greenish |
Sits on top of #44581