Skip to content

add test for concating tzaware series with empty series. Issue: #34174 #56685

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

xiaohuanlin
Copy link
Contributor

@xiaohuanlin xiaohuanlin commented Dec 30, 2023

@xiaohuanlin xiaohuanlin changed the title add test for concating tzaware series with empty series. PR: #34174 add test for concating tzaware series with empty series. Issue: #34174 Dec 30, 2023
@xiaohuanlin xiaohuanlin force-pushed the add_test_for_concating_tz_aware_series branch from 128c31e to 57348c3 Compare December 30, 2023 15:14
Comment on lines 60 to 61
tm.assert_index_equal(pd.Index([tzaware_time], dtype="object"), result.index)
tm.assert_series_equal(Series([0.0, None], name=tzaware_time), result.iloc[0])
Copy link
Member

Choose a reason for hiding this comment

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

Could you construct an expected = pd.DataFrame(...) and use tm.assert_frame_equal(result, expected)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Just changed the format

@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Jan 2, 2024
@xiaohuanlin xiaohuanlin force-pushed the add_test_for_concating_tz_aware_series branch from 57348c3 to d51a161 Compare January 2, 2024 23:10
@xiaohuanlin xiaohuanlin requested a review from mroeschke January 3, 2024 04:06
@mroeschke mroeschke added this to the 3.0 milestone Jan 3, 2024
@mroeschke mroeschke merged commit d64785d into pandas-dev:main Jan 3, 2024
@mroeschke
Copy link
Member

Thanks @xiaohuanlin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: pd.concat inconsistent behaviour with empty and tz-aware Series
2 participants