Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: OLS.predict() fails when given a Series #5233

Closed
rockg opened this issue Oct 15, 2013 · 1 comment · Fixed by #5251
Closed

BUG: OLS.predict() fails when given a Series #5233

rockg opened this issue Oct 15, 2013 · 1 comment · Fixed by #5251
Milestone

Comments

@rockg
Copy link
Contributor

rockg commented Oct 15, 2013

OLS.predict() makes a call to dropna() with an argument when Series has no such argument. I believe the fix here is to just move the DataFrame creation above the "if fill_value" clause.

            orig_x = x
            if fill_value is None and fill_method is None:
                x = x.dropna(how='any')
            else:
                x = x.fillna(value=fill_value, method=fill_method, axis=axis)
            if isinstance(x, Series):
                x = DataFrame({'x': x})
            if self._intercept:
                x['intercept'] = 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants