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

Upsampling - fill #563

Open
slharris opened this issue Sep 9, 2015 · 4 comments
Open

Upsampling - fill #563

slharris opened this issue Sep 9, 2015 · 4 comments

Comments

@slharris
Copy link

slharris commented Sep 9, 2015

Will the next version of xray have the capability to fill when upsampling?

@shoyer
Copy link
Member

shoyer commented Sep 9, 2015

It would be pretty straightforward to add the pandas up-sampling fill methods. This is not on my immediate priority list, but I'm happy to point you in the right direction if you're interested in making a contribution.

@slharris
Copy link
Author

slharris commented Sep 9, 2015

I could try....

@shoyer
Copy link
Member

shoyer commented Sep 9, 2015

Upsampling (in both xray and pandas) is done through a reindex operation. So doing filling while resampling is simply a matter of adding a fill_method argument to resample [1], passing it on to the GroupBy object [2], and using it for the method argument when we call _maybe_restore_empty_groups [3].

Here are the relevant lines in xray:
[1] https://github.com/xray/xray/blob/v0.6.0/xray/core/common.py#L277-L351
[2] https://github.com/xray/xray/blob/v0.6.0/xray/core/groupby.py#L86
[3] https://github.com/xray/xray/blob/v0.6.0/xray/core/groupby.py#L221-L229

@slharris
Copy link
Author

slharris commented Sep 16, 2015

I am sorry but I do not think I can make a contribution. I really do not
know what I am doing!

I hope someone with some skills can add the fill method for up-sampling?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants