Skip to content

Series.fillna doesn't work with series input #5703

Closed
@miketkelly

Description

@miketkelly

Test code:

import pandas as pd

print pd.__version__

s1 = pd.Series([np.nan])
s2 = pd.Series([1])

s1.fillna(s2)

Results:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-10-28706fea97bb> in <module>()
      6 s2 = pd.Series([1])
      7 
----> 8 s1.fillna(s2)

/usr/local/anaconda/lib/python2.7/site-packages/pandas-0.13.0rc1_64_gceec8bf-py2.7-linux-x86_64.egg/pandas/core/generic.pyc in fillna(self, value, method, axis, inplace, limit, downcast)
   1917                         continue
   1918                     obj = result[k]
-> 1919                     obj.fillna(v, inplace=True)
   1920                 return result
   1921             else:

AttributeError: 'numpy.float64' object has no attribute 'fillna'

0.13.0rc1-64-gceec8bf

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions