Skip to content

using DataFrame.interpolate with inplace=True causes error #6402

Closed
@beOn

Description

@beOn

I got the error below. Looking at the code, it looks like there's a return statement missing above - the code should never get to this point, or should return the DataFrame given as argument, whenever inplace=True.

/Library/Python/2.7/site-packages/pandas/core/generic.pyc in interpolate(self, method, axis, limit, inplace, downcast, **kwargs)
   2304         if axis == 1:
   2305             res = res.T
-> 2306         return res
   2307 
   2308     #----------------------------------------------------------------------

UnboundLocalError: local variable 'res' referenced before assignment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions