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

API: extend resample to handle non-datetime numeric axes? #12828

Open
shoyer opened this issue Apr 8, 2016 · 1 comment
Open

API: extend resample to handle non-datetime numeric axes? #12828

shoyer opened this issue Apr 8, 2016 · 1 comment
Labels

Comments

@shoyer
Copy link
Member

shoyer commented Apr 8, 2016

Numeric indexes are pretty common with scientific datasets and xarray. For such data, resampling to a new resolution is a pretty common operation.

Currently, resampling only works for dates. Any thoughts on making it work for all numeric axes? I think every argument in the signature would still make sense for numbers, except the rule would be expected to be a number, not a string.

I expect the implementation would be relatively straightforward, given that we don't need to handle the complexity of datetime frequencies.

xref pydata/xarray#818

@jreback
Copy link
Contributor

jreback commented Apr 8, 2016

yes, this is not very hard, basically just need a way to snap points to new points, which is what cut does (and you can generically map as well). The new .resample is pretty setup to do this as well. For completeness, can you show a simple motiviating example, with a demo-frame and output.

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

No branches or pull requests

3 participants