Skip to content

No TimeGrouper docs, Day-of-Week resampling? #14760

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

Closed
naught101 opened this issue Nov 29, 2016 · 4 comments
Closed

No TimeGrouper docs, Day-of-Week resampling? #14760

naught101 opened this issue Nov 29, 2016 · 4 comments
Labels

Comments

@naught101
Copy link

TimeGrouper isn't really mentioned in the docs at all. In particular, it'd be nice to know what the grouping options are. I assume they're the same as resample's options? I also can't find a simple list of those.

In particular, weekly grouping is doable via 'W', but I can't find that listed in the docs anywhere.

It would also be really nice to have a 'DoW' (Day of Week) grouping option - this can be really useful for any data with a human signal in it.

@jorisvandenbossche
Copy link
Member

There are these docs for Grouper:

In particular, weekly grouping is doable via 'W', but I can't find that listed in the docs anywhere.

The frequency options are listed here: http://pandas.pydata.org/pandas-docs/stable/timeseries.html#offset-aliases (and this is linked to at several places, but I see that the docstring of Grouper has a too general link to the timeseries page).

It would also be really nice to have a 'DoW' (Day of Week) grouping option

This is not a frequency (it does not give you a timeseries). But such grouping is indeed very useful, and can be obtained with df.groupby(df.index.dayofweak)

@naught101 If you have specific points were those docs can be improved, we would really love to hear it (or get a PR to fix it :-)). More eyes give better docs.

@naught101
Copy link
Author

None of those pages you linked to actually mentions 'TimeGrouper`. Nor does TimeGrouper appear in the 'API reference' section of the docs. It has built-in documentation, is there a reason that isn't included in the API docs?

Sorry, re-sampling was probably not the right word.. yes, that day of week works fine for my purposes..

@jreback
Copy link
Contributor

jreback commented Nov 29, 2016

TimeGrouper is not a public interface (its orignal, so its not deprecated either), instead see docs: http://pandas.pydata.org/pandas-docs/stable/groupby.html#grouping-with-a-grouper-specification

@jreback jreback closed this as completed Nov 29, 2016
@jorisvandenbossche
Copy link
Member

@naught101 yes, sorry, forgot to mention that all my references were to pd.Grouper, which can be used instead of pd.TimeGrouper

jorisvandenbossche added a commit that referenced this issue Dec 15, 2016
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