8000 DEPR: Bunch o deprecation removals part 2 by jreback · Pull Request #10892 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

DEPR: Bunch o deprecation removals part 2 #10892

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

Merged
merged 6 commits into from
Aug 24, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
DEPR: WidePanel, LongPanel -> deprecated
  • Loading branch information
jreback committed Aug 24, 2015
commit 0774b57ac1e0301b77984734afee30a772195dca
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.17.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ Deprecations
``DataFrame.add(other, fill_value=0)`` and ``DataFrame.mul(other, fill_value=1.)``
(:issue:`10735`).
- ``TimeSeries`` deprecated in favor of ``Series`` (note that this has been alias since 0.13.0), (:issue:`10890`)
- ``WidePanel`` deprecated in favor of ``Panel``, ``LongPanel`` in favor of ``DataFrame`` (note these have been aliases since < 0.11.0), (:issue:`10892`)

.. _whatsnew_0170.prior_deprecations:

Expand Down
4 changes: 1 addition & 3 deletions pandas/core/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@

from pandas.core.series import Series, TimeSeries
from pandas.core.frame import DataFrame
from pandas.core.panel import Panel
from pandas.core.panel import Panel, WidePanel
from pandas.core.panel4d import Panel4D
from pandas.core.groupby import groupby
from pandas.core.reshape import (pivot_simple as pivot, get_dummies,
lreshape, wide_to_long)

WidePanel = Panel

from pandas.core.indexing import IndexSlice
from pandas.tseries.offsets import DateOffset
from pandas.tseries.tools import to_datetime
Expand Down
22 changes: 20 additions & 2 deletions pandas/core/panel.py
8000
Original file line number Diff line number Diff line change
Expand Up @@ -1509,5 +1509,23 @@ def f(self, other, axis=0):
Panel._add_aggregate_operations()
Panel._add_numeric_operations()

WidePanel = Panel
LongPanel = DataFrame
# legacy
class WidePanel(Panel):

def __init__(self, *args, **kwargs):

# deprecation, #10892
warnings.warn("WidePanel is deprecated. Please use Panel",
FutureWarning, stacklevel=2)

super(WidePanel, self).__init__(*args, **kwargs)

class LongPanel(DataFrame):

def __init__(self, *args, **kwargs):

# deprecation, #10892
warnings.warn("LongPanel is deprecated. Please use DataFrame",
FutureWarning, stacklevel=2)

super(LongPanel, self).__init__(*args, **kwargs)
0