| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/site-packages/pandas/tests/indexes/period/methods/ |
Upload File : |
import pytest
from pandas import PeriodIndex
def test_is_full():
index = PeriodIndex([2005, 2007, 2009], freq="Y")
assert not index.is_full
index = PeriodIndex([2005, 2006, 2007], freq="Y")
assert index.is_full
index = PeriodIndex([2005, 2005, 2007], freq="Y")
assert not index.is_full
index = PeriodIndex([2005, 2005, 2006], freq="Y")
assert index.is_full
index = PeriodIndex([2006, 2005, 2005], freq="Y")
with pytest.raises(ValueError, match="Index is not monotonic"):
index.is_full
assert index[:0].is_full