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

ENH: Allow pandas-in/pandas-out in tsa.filters #794

Merged
merged 5 commits into from Apr 26, 2013

Conversation

jseabold
Copy link
Member

Closes #793.

@jseabold
Copy link
Member Author

I can change this to use a decorator, but I assumed this was preferable.

if hasattr(X, "columns"):
return lambda x : X.__class__(x, index=index, columns=X.columns)
else:
return lambda x : X.__class__(x, index=index, name=X.name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explicit

else:
    return None

would be clearer to follow.

Looks like a useful helper function
AFAICS output has same shape as the input except for trimming

@jseabold
Copy link
Member Author

More explicit naming.

@jseabold
Copy link
Member Author

Re: generality, I could see it evolve into a useful decorator (less work to use), but I'd need to look at some more use cases first. Just noticed this in the tutorials and it was low hanging.

jseabold added a commit that referenced this pull request Apr 26, 2013
ENH: Allow pandas-in/pandas-out in tsa.filters
@jseabold jseabold merged commit dd47b82 into statsmodels:master Apr 26, 2013
@jseabold jseabold deleted the filters-pandas branch April 26, 2013 19:49
PierreBdR pushed a commit to PierreBdR/statsmodels that referenced this pull request Sep 2, 2014
ENH: Allow pandas-in/pandas-out in tsa.filters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

filters are not pandas aware
2 participants