Skip to content

Commit b4a166d

Browse files
committed
Merge pull request #5716 from pydata/winfix4
TST/DOC: close win32 tests issues (GH5711)
2 parents 7fd33e3 + ea52fc3 commit b4a166d

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

pandas/core/generic.py

+10-9
Original file line numberDiff line numberDiff line change
@@ -1830,23 +1830,24 @@ def fillna(self, value=None, method=None, axis=0, inplace=False,
18301830
Method to use for filling holes in reindexed Series
18311831
pad / ffill: propagate last valid observation forward to next valid
18321832
backfill / bfill: use NEXT valid observation to fill gap
1833-
value : scalar or dict
1834-
Value to use to fill holes (e.g. 0), alternately a dict of values
1835-
specifying which value to use for each column (columns not in the
1836-
dict will not be filled). This value cannot be a list.
1833+
value : scalar, dict, or Series
1834+
Value to use to fill holes (e.g. 0), alternately a dict/Series of
1835+
values specifying which value to use for each index (for a Series) or
1836+
column (for a DataFrame). (values not in the dict/Series will not be
1837+
filled). This value cannot be a list.
18371838
axis : {0, 1}, default 0
18381839
0: fill column-by-column
18391840
1: fill row-by-row
18401841
inplace : boolean, default False
18411842
If True, fill in place. Note: this will modify any
18421843
other views on this object, (e.g. a no-copy slice for a column in a
1843-
DataFrame). Still returns the object.
1844+
DataFrame).
18441845
limit : int, default None
18451846
Maximum size gap to forward or backward fill
1846-
downcast : dict, default is None, a dict of item->dtype of what to
1847-
downcast if possible, or the string 'infer' which will try to
1848-
downcast to an appropriate equal type (e.g. float64 to int64 if
1849-
possible)
1847+
downcast : dict, default is None
1848+
a dict of item->dtype of what to downcast if possible,
1849+
or the string 'infer' which will try to downcast to an appropriate
1850+
equal type (e.g. float64 to int64 if possible)
18501851
18511852
See also
18521853
--------

pandas/tests/test_indexing.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,7 @@ def test_astype_assignment(self):
13821382
df_orig = DataFrame([['1','2','3','.4',5,6.,'foo']],columns=list('ABCDEFG'))
13831383

13841384
df = df_orig.copy()
1385-
df.iloc[:,0:2] = df.iloc[:,0:2].astype(int)
1385+
df.iloc[:,0:2] = df.iloc[:,0:2].astype(np.int64)
13861386
expected = DataFrame([[1,2,'3','.4',5,6.,'foo']],columns=list('ABCDEFG'))
13871387
assert_frame_equal(df,expected)
13881388

@@ -1393,12 +1393,12 @@ def test_astype_assignment(self):
13931393

13941394
# GH5702 (loc)
13951395
df = df_orig.copy()
1396-
df.loc[:,'A'] = df.loc[:,'A'].astype(int)
1396+
df.loc[:,'A'] = df.loc[:,'A'].astype(np.int64)
13971397
expected = DataFrame([[1,'2','3','.4',5,6.,'foo']],columns=list('ABCDEFG'))
13981398
assert_frame_equal(df,expected)
13991399

14001400
df = df_orig.copy()
1401-
df.loc[:,['B','C']] = df.loc[:,['B','C']].astype(int)
1401+
df.loc[:,['B','C']] = df.loc[:,['B','C']].astype(np.int64)
14021402
expected = DataFrame([['1',2,3,'.4',5,6.,'foo']],columns=list('ABCDEFG'))
14031403
assert_frame_equal(df,expected)
14041404

pandas/tests/test_series.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ def f():
13451345

13461346
s[0:3] = list(range(3))
13471347
expected = Series([0,1,2])
1348-
assert_series_equal(s, expected)
1348+
assert_series_equal(s.astype(np.int64), expected, )
13491349

13501350
# slice with step
13511351
s = Series(list('abcdef'))

0 commit comments

Comments
 (0)