-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST closes #28980 Certain comparison operations misbehaving for period dtype #34417
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
Looks pretty good, can you modify the description with "closes" in front of the issue number so that it'll be closed automatically when this is merged? |
@OlivierLuG I meant the description of the PR (where you have the bulleted list) rather than the PR title |
Hello, If you think this is correct, I can pull a new request to close #28981, which test about the same tests ? |
thanks |
@@ -1522,3 +1522,11 @@ def test_pi_sub_period_nat(self): | |||
exp = pd.TimedeltaIndex([np.nan, np.nan, np.nan, np.nan], name="idx") | |||
tm.assert_index_equal(idx - pd.Period("NaT", freq="M"), exp) | |||
tm.assert_index_equal(pd.Period("NaT", freq="M") - idx, exp) | |||
|
|||
@pytest.mark.parametrize("scalars", ["a", False, 1, 1.0, None]) | |||
def test_comparison_operations(self, scalars): |
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.
why not use the box_with_array
fixture?
I've added test to compare
pd.Series([...], dtype="period[A-DEC]")
to dtypestr
,bool
,int
,float
andNone
.black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff