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

Deprecation of Panel ? #13563

Closed
jorisvandenbossche opened this Issue Jul 5, 2016 · 6 comments

Comments

Projects
None yet
6 participants
@jorisvandenbossche
Member

jorisvandenbossche commented Jul 5, 2016

This is a topic that has come up recently (#10000, #8906, pandas-dev mailing list discussion), let's make this an issue to track the discussion about it.

  • #8906 (comment) experience of the 'experimental' status of Panels by @MaximilianR and following discussion on pointing users to xarray
  • Issue for docs on using xarray instead of Panels: #12283
  • "WIP for transitioning from Panel docs" PR pydata/xarray#832

Deprecating Panels would be a rather large change, so:

  • Do we need to further discuss if we actually want to do this?
  • Are there people who make intensive use of Panels to ask feedback?
  • How do we go about such a deprecation? First making a note in the whatsnew / pinging mailing list or other fora before actually deprecating?

cc @pydata/pandas @MaximilianR

@sinhrks

This comment has been minimized.

Member

sinhrks commented Jul 5, 2016

I'm +1 on moving to xarray, but GitHub search shows the deprecation is not easy... As long as I know about popular packages, pydata/data-reader and quantopian/zipline uses Panel.

CC @davidastephens @ehebert

@max-sixty

This comment has been minimized.

Contributor

max-sixty commented Jul 5, 2016

No change this end - we are still using xarray heavily, and it's working beautifully. We've also improved the integration of xarray & pandas, so that should ease the path to deprecation.

@wesm

This comment has been minimized.

Member

wesm commented Jul 12, 2016

I'm +1 on deprecating Panels; @jreback moved mountains to create a consistent internal object model from 1 to N dimensions, but there is still a feeling of second-class citizenry when it comes to working with data over 2 dimensions. I think we would be better served in the long run by really optimizing for the 1 and 2-dimensional use cases (similar to what the R community has done, though the API surface area of dplyr, data.table, and built-in data frames is quite a bit smaller than pandas -- primarily lacking in the level of indexing complexity).

I maintain that we should plan for a pandas 0.X.Y long-term support LTS release branch that becomes bugfix only so that we can start investing in renovations. I'm interested in feedback from the other core devs how realistic you feel this is.

I've long worried about the amount of baggage we are carrying forward -- there are many organizations with large codebases that have made their peace with pandas's rough edges (data type issues, view / copying semantics, etc.), and it doesn't make sense to abandon them. On the flip side, it would be a shame to be held back from undertaking a more aggressive cleanup and retool of the internals to introduce better performance, extensibility, missing data / data type issues, etc. I regret that 6 months have passed since I brought up this grand scheme and I haven't been able to carve out the time to make a dent, beyond demo'ing a proof-of-concept of integer NAs. Also, I would feel much better about working on this on a long-lived branch (similar to what happened with IPython) under some kind of feature freeze.

Anyway, some of these comments are beyond the scope of this issue. I don't think we should deprecate Panel unless we're collectively on board to the idea of cleaning up pandas internals over the next 12-24 months (which is as much of a code organization problem as anything -- particularly quarantining unit tests that we are contemplating "breaking").

jreback added a commit to jreback/pandas that referenced this issue Mar 7, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 7, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 7, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 7, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 7, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 8, 2017

@delgadom delgadom referenced this issue Mar 11, 2017

Closed

Subclassed reshape clean #15655

4 of 4 tasks complete

jreback added a commit to jreback/pandas that referenced this issue Mar 22, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 22, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 23, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 23, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 24, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 25, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 25, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 27, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 27, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 27, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 28, 2017

jreback added a commit to jreback/pandas that referenced this issue Mar 28, 2017

jreback added a commit to jreback/pandas that referenced this issue Apr 2, 2017

jreback added a commit to jreback/pandas that referenced this issue Apr 3, 2017

jreback added a commit to jreback/pandas that referenced this issue Apr 6, 2017

jreback added a commit to jreback/pandas that referenced this issue Apr 7, 2017

jreback added a commit to jreback/pandas that referenced this issue Apr 7, 2017

@jreback jreback closed this in c25fbde Apr 7, 2017

linebp added a commit to linebp/pandas that referenced this issue Apr 17, 2017

DEPR: Panel deprecated
closes pandas-dev#13563
on top of pandas-dev#15677

Author: Jeff Reback <jeff@reback.net>

Closes pandas-dev#15601 from jreback/panel and squashes the following commits:

04104a7 [Jeff Reback] fine grained catching warnings in tests
f8800dc [Jeff Reback] add numpy reference for searchsorted
fa136dd [Jeff Reback] doc correction
c39453a [Jeff Reback] add perf optimization in searchsorted for FrozenNDArray
0e9c4a4 [Jeff Reback] fix docs as per review & column name changes
3df0abe [Jeff Reback] remove Panel from doc-strings, catch internal warning on Panel construction
755606d [Jeff Reback] more docs
d04db2e [Jeff Reback] add deprecate_panel section to docs
538b8e8 [Jeff Reback] pep fix
912d523 [Jeff Reback] TST: separate out test_append_to_multiple_dropna to two tests; when drop=False this is sometimes failing
a2625ba [Jeff Reback] remove most Term references in test_pytables.py
cd5b6b8 [Jeff Reback] DEPR: Panel deprecated
6b20ddc [Jeff Reback] fix names on return structure
f41d3df [Jeff Reback] API: df.rolling(..).corr()/cov() when pairwise=True to return MI DataFrame
84e788b [Jeff Reback] BUG/PERF: handle a slice correctly in get_level_indexer
@denfromufa

This comment has been minimized.

denfromufa commented Nov 1, 2017

There are plenty of examples using panel in SO:

https://stackoverflow.com/questions/tagged/panel+pandas

One particular one I'm not sure how to port and do not want to depend on xarray is this one:

https://stackoverflow.com/a/23088780/2230844

@jaypeedevlin

This comment has been minimized.

jaypeedevlin commented Mar 14, 2018

I noticed today that none of the docs for the panel class/methods seem to have notification around the fact that it's deprecated.

There's the 'deprecate panel' in the 0.22.0 'what's new', but it seems likely that people may not see that if they're searching for panel or following direct links to the docs.

I can see this example of a deprecation note in a docstring, which subjectively doesn't seem to draw a lot of attention to itself. Is there a convention for these that's a little bit more 'attention-grabbing'? Once I know of the best way, I'm happy to submit a PR.

Edit: Actually, just found 1d32264 which seems to indicate exactly what to do in this instance.

@jorisvandenbossche

This comment has been minimized.

Member

jorisvandenbossche commented Mar 14, 2018

There is a deprecation in the user guide, and a warning when you actually use it, but you are certainly correct we could add a notice in all docstrings as well to give this more visibility.

Typically a .. deprecated:: sphinx directive is the way to go to add such deprecations.

PR very welcome!

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