Repository: pandas-dev/pandas

Issue:
Failing tests on win/jenkins
This across all bits/pythons:

pandas.tests.test_indexing.TestIndexing.test_astype_assignment  16 ms   3

``` python
Error Message

attr is not equal [dtype]: dtype('int32') != dtype('int64')

Stacktrace

Traceback (most recent call last):
  File "c:\Python26-AMD64\Lib\unittest.py", line 279, in run
    testMethod()
  File "C:\Program Files (x86)\Jenkins\workspace\pandas_tests\BITS\64\PYTHONVER\26\pandas\tests\test_indexing.py", line 1387, in test_astype_assignment
    assert_frame_equal(df,expected)
  File "C:\Program Files (x86)\Jenkins\workspace\pandas_tests\BITS\64\PYTHONVER\26\pandas\util\testing.py", line 493, in assert_frame_equal
    check_less_precise=check_less_precise)
  File "C:\Program Files (x86)\Jenkins\workspace\pandas_tests\BITS\64\PYTHONVER\26\pandas\util\testing.py", line 441, in assert_series_equal
    assert_attr_equal('dtype', left, right)
  File "C:\Program Files (x86)\Jenkins\workspace\pandas_tests\BITS\64\PYTHONVER\26\pandas\util\testing.py", line 425, in assert_attr_equal
    assert_equal(left_attr,right_attr,"attr is not equal [{0}]" .format(attr))
  File "C:\Program Files (x86)\Jenkins\workspace\pandas_tests\BITS\64\PYTHONVER\26\pandas\util\testing.py", line 408, in assert_equal
    assert a == b, "%s: %r != %r" % (msg.format(a,b), a, b)
AssertionError: attr is not equal [dtype]: dtype('int32') != dtype('int64')

```

pandas.tests.test_series.TestSeries.test_where_setitem_invalid

``` python
Error Message

attr is not equal [dtype]: dtype('int32') != dtype('int64')

Stacktrace

Traceback (most recent call last):
  File "c:\Python26-AMD64\Lib\unittest.py", line 279, in run
    testMethod()
  File "C:\Program Files (x86)\Jenkins\workspace\pandas_tests\BITS\64\PYTHONVER\26\pandas\tests\test_series.py", line 1348, in test_where_setitem_invalid
    assert_series_equal(s, expected)
  File "C:\Program Files (x86)\Jenkins\workspace\pandas_tests\BITS\64\PYTHONVER\26\pandas\util\testing.py", line 441, in assert_series_equal
    assert_attr_equal('dtype', left, right)
  File "C:\Program Files (x86)\Jenkins\workspace\pandas_tests\BITS\64\PYTHONVER\26\pandas\util\testing.py", line 425, in assert_attr_equal
    assert_equal(left_attr,right_attr,"attr is not equal [{0}]" .format(attr))
  File "C:\Program Files (x86)\Jenkins\workspace\pandas_tests\BITS\64\PYTHONVER\26\pandas\util\testing.py", line 408, in assert_equal
    assert a == b, "%s: %r != %r" % (msg.format(a,b), a, b)
AssertionError: attr is not equal [dtype]: dtype('int32') != dtype('int64')
```



Discussion:
my fault!!! I will test/fix later today

wish we could do a travis 32-bit build :<

where do you get these notification?

Was sick of windows holding up releases, so I "took steps".

gr8! I test locally...but just threw these in...will fix...thanks for the report!


Resolving patch:
diff --git a/pandas/core/generic.py b/pandas/core/generic.py
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -1830,23 +1830,24 @@ def fillna(self, value=None, method=None, axis=0, inplace=False,
             Method to use for filling holes in reindexed Series
             pad / ffill: propagate last valid observation forward to next valid
             backfill / bfill: use NEXT valid observation to fill gap
-        value : scalar or dict
-            Value to use to fill holes (e.g. 0), alternately a dict of values
-            specifying which value to use for each column (columns not in the
-            dict will not be filled). This value cannot be a list.
+        value : scalar, dict, or Series
+            Value to use to fill holes (e.g. 0), alternately a dict/Series of 
+            values specifying which value to use for each index (for a Series) or 
+            column (for a DataFrame). (values not in the dict/Series will not be 
+            filled). This value cannot be a list.
         axis : {0, 1}, default 0
             0: fill column-by-column
             1: fill row-by-row
         inplace : boolean, default False
             If True, fill in place. Note: this will modify any
             other views on this object, (e.g. a no-copy slice for a column in a
-            DataFrame).  Still returns the object.
+            DataFrame).
         limit : int, default None
             Maximum size gap to forward or backward fill
-        downcast : dict, default is None, a dict of item->dtype of what to
-            downcast if possible, or the string 'infer' which will try to
-            downcast to an appropriate equal type (e.g. float64 to int64 if
-            possible)
+        downcast : dict, default is None
+             a dict of item->dtype of what to downcast if possible, 
+            or the string 'infer' which will try to downcast to an appropriate 
+            equal type (e.g. float64 to int64 if possible)
 
         See also
         --------


Test patch:
diff --git a/pandas/tests/test_indexing.py b/pandas/tests/test_indexing.py
--- a/pandas/tests/test_indexing.py
+++ b/pandas/tests/test_indexing.py
@@ -1382,7 +1382,7 @@ def test_astype_assignment(self):
         df_orig = DataFrame([['1','2','3','.4',5,6.,'foo']],columns=list('ABCDEFG'))
 
         df = df_orig.copy()
-        df.iloc[:,0:2] = df.iloc[:,0:2].astype(int)
+        df.iloc[:,0:2] = df.iloc[:,0:2].astype(np.int64)
         expected = DataFrame([[1,2,'3','.4',5,6.,'foo']],columns=list('ABCDEFG'))
         assert_frame_equal(df,expected)
 
@@ -1393,12 +1393,12 @@ def test_astype_assignment(self):
 
         # GH5702 (loc)
         df = df_orig.copy()
-        df.loc[:,'A'] = df.loc[:,'A'].astype(int)
+        df.loc[:,'A'] = df.loc[:,'A'].astype(np.int64)
         expected = DataFrame([[1,'2','3','.4',5,6.,'foo']],columns=list('ABCDEFG'))
         assert_frame_equal(df,expected)
 
         df = df_orig.copy()
-        df.loc[:,['B','C']] = df.loc[:,['B','C']].astype(int)
+        df.loc[:,['B','C']] = df.loc[:,['B','C']].astype(np.int64)
         expected =  DataFrame([['1',2,3,'.4',5,6.,'foo']],columns=list('ABCDEFG'))
         assert_frame_equal(df,expected)
 
diff --git a/pandas/tests/test_series.py b/pandas/tests/test_series.py
--- a/pandas/tests/test_series.py
+++ b/pandas/tests/test_series.py
@@ -1345,7 +1345,7 @@ def f():
 
         s[0:3] = list(range(3))
         expected = Series([0,1,2])
-        assert_series_equal(s, expected)
+        assert_series_equal(s.astype(np.int64), expected, )
 
         # slice with step
         s = Series(list('abcdef'))