Skip to content

Commit afc7266

Browse files
committed
valid_fill_value -> is_valid_fill_value
1 parent c30b777 commit afc7266

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Diff for: pandas/core/generic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
is_dict_like,
2626
is_re_compilable)
2727
from pandas.types.cast import maybe_promote, maybe_upcast_putmask
28-
from pandas.types.missing import isnull, notnull, valid_fill_value
28+
from pandas.types.missing import isnull, notnull, is_valid_fill_value
2929
from pandas.types.generic import ABCSeries, ABCPanel
3030

3131
from pandas.core.common import (_values_from_object,

Diff for: pandas/core/missing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
_ensure_float64, is_scalar,
1515
needs_i8_conversion, is_integer,
1616
is_period_arraylike)
17-
from pandas.types.missing import isnull, valid_fill_value
17+
from pandas.types.missing import isnull, is_valid_fill_value
1818
from pandas.types.generic import ABCSeries
1919

2020

@@ -658,7 +658,7 @@ def maybe_fill(obj, value, errors):
658658
if errors is None or errors == 'coerce':
659659
return True
660660
else:
661-
if not valid_fill_value(value, obj.dtype):
661+
if not is_valid_fill_value(value, obj.dtype):
662662
if errors == 'raise':
663663
raise TypeError('"value" parameter must be compatible '
664664
'with the {0} dtype, but you passed a '

Diff for: pandas/tests/types/test_missing.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from pandas.types.dtypes import DatetimeTZDtype
1515
from pandas.types.missing import (array_equivalent, isnull, notnull,
1616
na_value_for_dtype,
17-
valid_fill_value)
17+
is_valid_fill_value)
1818

1919

2020
def test_notnull():
@@ -319,7 +319,7 @@ def test_na_value_for_dtype():
319319
(timedelta(0), np.timedelta64),
320320
(pd.Timedelta(0), np.timedelta64)])
321321
def test_valid_fill_value(value, dtype):
322-
assert valid_fill_value(value, dtype)
322+
assert is_valid_fill_value(value, dtype)
323323

324324

325325
@pytest.mark.parametrize(('value', 'dtype'),
@@ -334,4 +334,4 @@ def test_valid_fill_value(value, dtype):
334334
(datetime(1970, 1, 1), np.dtype('timedelta64')),
335335
(pd.Period('1970-01-01'), np.dtype('timedelta64'))])
336336
def test_invalid_fill_value(value, dtype):
337-
assert not valid_fill_value(value, dtype)
337+
assert not is_valid_fill_value(value, dtype)

Diff for: pandas/types/missing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def na_value_for_dtype(dtype):
396396
return np.nan
397397

398398

399-
def valid_fill_value(value, dtype):
399+
def is_valid_fill_value(value, dtype):
400400
"""
401401
Makes sure the fill value is appropriate for the given dtype.
402402

0 commit comments

Comments
 (0)