-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
TST: Add a regression test for the timezone issue #29097
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
simonjayhawkins
left a comment
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.
@grigoriosgiann Thanks for the PR.
| pd.Timestamp("2019-03-15 12:34:34.660000+0000", tz="UTC"), | ||
| ], | ||
| ) | ||
| df2 = df.apply(lambda x: x.name, axis=1) |
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.
call this result
| assert df[0].keys().dtype == df2.dtypes | ||
| assert (df[0].keys().values == df2.values).all() |
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.
construct the expected DataFrame explicitly and do tm.assert_frame_equals(result,expected)
ec65243 to
7415fc6
Compare
|
Hello @grigoriosgiann! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-10-20 10:52:05 UTC |
7415fc6 to
3109dff
Compare
Thanks for the feedback! 😄 |
|
|
||
| tm.assert_series_equal(result, expected) | ||
|
|
||
| def test_apply_datetime_tz_issue(self): |
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.
looks good, can you move to pandas/tests/frame/test_apply.py
ping on green.
3109dff to
9b234b4
Compare
|
lgtm. ping on green. |
|
Azure appears to be stuck... Edit: Force re-pushed since azure failed after some time (https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=19252&view=logs) |
bd070d4 to
b528352
Compare
Add a regression test to ensure that the timezone doesn't get removed when using `df.apply`.
b528352 to
2ddda38
Compare
|
Ping, it's green!😄 |
|
thanks @grigoriosgiann |
Add a regression test for the timezone issue (pandas-dev#29097)
Add a regression test to ensure that the timezone doesn't get removed
when using
df.apply.black pandasgit diff upstream/master -u -- "*.py" | flake8 --diff