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

DEPR: pd.TimeGrouper #16747

Closed
tdpetrou opened this issue Jun 21, 2017 · 10 comments · Fixed by #17703
Closed

DEPR: pd.TimeGrouper #16747

tdpetrou opened this issue Jun 21, 2017 · 10 comments · Fixed by #17703
Labels
Deprecate Functionality to remove in pandas Docs
Milestone

Comments

@tdpetrou
Copy link
Contributor

tdpetrou commented Jun 21, 2017

Problem description

The TimeGrouper docstrings are missing the key and level parameters. TimeGrouper is also absent from the API reference page in the docs. I think it would also be nice to have a section in the docs on how it differs than resample.

@TomAugspurger
Copy link
Contributor

It is documented under Grouper: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Grouper.html I thought we always recommended it rather than TimeGrouper, but grepping through the docs shows that not to be the case.

@TomAugspurger
Copy link
Contributor

@tdpetrou
Copy link
Contributor Author

tdpetrou commented Jun 21, 2017

Does TimeGrouper have any advantage over Grouper other than its more explicit name? If not, shouldn't it be deprecated?

@jreback
Copy link
Contributor

jreback commented Jun 22, 2017

TimeGrouper was the long time way to do resampling from a groupby framework. This has been integrated for quite some time into the exposed Grouper interface. We could deprecate TimeGrouper. it is one of those non-documented, not-directly-exposed things.

@jreback jreback added the Deprecate Functionality to remove in pandas label Jun 22, 2017
@jreback jreback added this to the Next Major Release milestone Jun 22, 2017
@tdpetrou
Copy link
Contributor Author

I think it doesn't help that the cookbook part of the docs (http://pandas.pydata.org/pandas-docs/stable/cookbook.html?highlight=timegrouper#resampling) directly links to three TimeGrouper use cases, two on stackoverflow. From experience and searching stackoverflow, it appears that some of the most viewed questions involving grouping by dates use TimeGrouper. Stackoverflow tends to perpetuate bad pandas practice, most noticeably with the continued daily questions that use .ix.

@jreback
Copy link
Contributor

jreback commented Jun 22, 2017

@tdpetrou yep certianly the cookbook could be updated to directly use Grouper. So if you want to fix up docs that would be good, independetly could deprecate this (meaning 2 PR's).

@jreback
Copy link
Contributor

jreback commented Jun 22, 2017

Stackoverflow tends to perpetuate bad pandas practice, most noticeably with the continued daily questions that use .ix.

SO is love-hate. Feel free to add links on questions where appropriate!

@manikbhandari
Copy link
Contributor

certianly the cookbook could be updated to directly use Grouper

I would like to take this up.

@jreback
Copy link
Contributor

jreback commented Jul 7, 2017

closed by #16794

@jreback jreback closed this as completed Jul 7, 2017
@jreback
Copy link
Contributor

jreback commented Jul 7, 2017

re-opening, this can track the deprecation.

@jreback jreback reopened this Jul 7, 2017
@jreback jreback changed the title pd.TimeGrouper documentation missing key and level parameters DEPR: pd.TimeGrouper Jul 7, 2017
@jreback jreback modified the milestones: 0.21.0, Next Major Release Jul 15, 2017
jreback added a commit to jreback/pandas that referenced this issue Sep 28, 2017
jreback added a commit that referenced this issue Sep 28, 2017
TomAugspurger added a commit to TomAugspurger/dask that referenced this issue Oct 3, 2017
TomAugspurger added a commit to TomAugspurger/dask that referenced this issue Oct 5, 2017
TomAugspurger added a commit to dask/dask that referenced this issue Oct 5, 2017
* COMPAT: pandas TimeGrouper

xref pandas-dev/pandas#16747

* COMPAT: For pandas 0.21 CategoricalDtype

* COMPAT: For pandas 0.21.0 HTML repr changes

pandas-dev/pandas#16879

* COMPAT: For pandas 0.21.0 numexpr import

pandas-dev/pandas#17710

* COMPAT: Default for inplace is now False in eval

pandas-dev/pandas#11149
alanbato pushed a commit to alanbato/pandas that referenced this issue Nov 10, 2017
No-Stream pushed a commit to No-Stream/pandas that referenced this issue Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants