8000 Make pd.Period immutable by jbrockmendel · Pull Request #17239 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

Make pd.Period immutable #17239

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 15 commits into from
Aug 24, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove message per reviewer suggestion
  • Loading branch information
jbrockmendel committed Aug 23, 2017
commit cd687bf5e384dd6349dbc65aa902f031c64f9a8f
4 changes: 2 additions & 2 deletions pandas/tests/scalar/test_period.py
Original file line number Diff line number Diff line change
Expand Up @@ -1411,9 +1411,9 @@ def test_period_ops_offset(self):
def test_period_immutable():
# see gh-17116
per = pd.Period('2014Q1')
with pytest.raises(AttributeError, message="is not writable"):
with pytest.raises(AttributeError):
per.ordinal = 14

freq = per.freq
with pytest.raises(AttributeError, message="is not writable"):
with pytest.raises(AttributeError):
per.freq = 2 * freq
0