Skip to content

Conversation

@vkverma9534
Copy link
Contributor

PeriodIndex.is_full currently returns True for monotonic indexes that contain duplicate period.
for example, a monthly index like ["2023-01", "2023-02", "2023-02", "2023-03"] is monotonic but not rangelike, so is_full should be False per the docstring.
the existing check allows zero-differences between consective values; this change requires a strict step of one period instead.
the fix is small and directly matches the documented behavior, so I put up the pr directly.

@vkverma9534
Copy link
Contributor Author

vkverma9534 commented Feb 7, 2026

@_maintainers this PR assumes is_full should also be false when there are duplicates, since that breaks the “range-like” idea (or not I think maybe the docstring could clarify that being “full” does not require values to be unique).
If uniqness is not meant to be part of is_full, totally fine — happy to drop this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant