-
-
Notifications
You must be signed in to change notification settings - Fork 19k
TST: Add regression tests for concat with non-ns DatetimeIndex units (GH#58471) #62304
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
base: main
Are you sure you want to change the base?
Conversation
@jbrockmendel I kindly request you to check the PR and let me know! |
Is this AI? |
The description of the PR contains some things from AI. I'm sorry if its an problem. |
Removed the AI part! Sorry for that. |
8918c62
to
08e33e9
Compare
@jbrockmendel Please check it now. Thanks! |
d9f5c25
to
2cd8c3a
Compare
@rhshadrach Request you to kindly check this. |
@skalwaghe-56 you don't need to ping us on every PR. We'll get to them all in due time. |
@jbrockmendel Sorry Sir! |
ffe118d
to
5650319
Compare
5650319
to
816c0d8
Compare
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.
Thanks @skalwaghe-56 for the PR.
Let's not add all these tests, just the minimum reproducible example, which in the linked issue looks like took a few contributors until it converged on anything that look like one!
816c0d8
to
6a832da
Compare
@simonjayhawkins Thanks for your review! I've confirmed that we include just the minimum reproducible example. I've added 2 test which I think are necessary for this issue and to confirm that is fixed properly. Thanks! |
6a832da
to
8e55e5a
Compare
df1 = concat([s1, s2], axis=1).sort_index() | ||
df2 = concat([s2, s1], axis=1).sort_index() |
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 test without sort_index. Tests should generally be about a single method. If we want to test sort_index
, then it should be in it's own test, but I don't think that's necessary for this bug.
|
||
@pytest.mark.parametrize("unit", ["ns"]) | ||
def test_concat_series_columns_nonoverlap_5min_units(self, unit): | ||
# GH#58471 minimal reproducible example |
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.
nit: minimal reproducible example
doesn't really add any information here and can be removed; it's generally applicable to all tests.
expected = date_range("2024-01-01", "2024-01-02 23:55", freq="5min", unit=unit) | ||
tm.assert_index_equal(result, expected) | ||
|
||
@pytest.mark.parametrize("unit", ["ns"]) |
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.
if its only "ns", then no need for parametrizing
Adds regression tests for pandas issue #58471. Added a total of 3 tests. All tests are parameterized across datetime units (ns/us/ms/s) to verify consistent behavior.
Thanks!