8000 BUG: caught typeError in series.at (#25506) by jopenmolles · Pull Request #25533 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

BUG: caught typeError in series.at (#25506) #25533

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

Merged
merged 9 commits into from
Mar 5, 2019
Prev Previous commit
Next Next commit
Added a test to verify the bug was fixed
  • Loading branch information
jopenmolles committed Mar 4, 2019
commit a218db743391970f0048f588d7736f9a2ecea4be
10 changes: 10 additions & 0 deletions pandas/tests/series/test_timezones.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,3 +364,13 @@ def test_tz_localize_convert_copy_inplace_mutate(self, copy, method, tz):
index=date_range('20131027', periods=5, freq='1H',
tz=tz))
tm.assert_series_equal(result, expected)

def test_series_set_tz_timestamp(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah pls move to pandas/tests/indexing/test_scalar.py, near this one: def test_at_with_tz

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've moved the test there

# GH 25506
ts = Timestamp('2017-08-05 00:00:00+0100', tz=pytz.FixedOffset(60))
Copy link
Contributor

Choose a reason for hiding this comment

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

can you use the tz_naive_fixture (tests a bunch of different timezones including fixed & no tz)

result = Series(ts)
result.at[1] = ts
expected = Series([ts, ts])
tm.assert_series_equal(result, expected)


0