@@ -1954,7 +1954,7 @@ def pct_change_overload(df, periods=1, fill_method='pad', limit=None, freq=None)
19541954
19551955 Limitations
19561956 -----------
1957- Parameters ``limit`` and ``freq`` are unsupported .
1957+ Parameters ``limit`` and ``freq`` are supported only with default value ``None`` .
19581958
19591959 Examples
19601960 --------
@@ -1995,16 +1995,16 @@ def pct_change_overload(df, periods=1, fill_method='pad', limit=None, freq=None)
19951995 ty_checker = TypeChecker ('Method {}().' .format (name ))
19961996 ty_checker .check (df , DataFrameType )
19971997
1998- if not isinstance (periods , (types .Integer , types .Omitted )):
1998+ if not isinstance (periods , (types .Integer , types .Omitted )) and periods != 1 :
19991999 ty_checker .raise_exc (periods , 'int64' , 'periods' )
20002000
20012001 if not isinstance (fill_method , (str , types .UnicodeType , types .StringLiteral , types .NoneType , types .Omitted )):
20022002 ty_checker .raise_exc (fill_method , 'string' , 'fill_method' )
20032003
2004- if not isinstance (limit , (types .Omitted , types .NoneType )):
2004+ if not isinstance (limit , (types .Omitted , types .NoneType )) and limit is not None :
20052005 ty_checker .raise_exc (limit , 'None' , 'limit' )
20062006
2007- if not isinstance (freq , (types .Omitted , types .NoneType )):
2007+ if not isinstance (freq , (types .Omitted , types .NoneType )) and freq is not None :
20082008 ty_checker .raise_exc (freq , 'None' , 'freq' )
20092009
20102010 params = {'periods' : 1 , 'fill_method' : '"pad"' , 'limit' : None , 'freq' : None }
0 commit comments