-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Remove Panel References #26287
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
Remove Panel References #26287
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4f4720b
Removed panel references from code base
WillAyd bc30088
Lint fixup
WillAyd f7b0678
Merge remote-tracking branch 'upstream/master' into panel-cleanups
WillAyd d5bf221
lint fixup
WillAyd 39e46b3
Removed validate_transpose_for_generic
WillAyd c4cd707
Replaced NotImplemented with AbstractMethodError
WillAyd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -368,9 +368,7 @@ def _constructor(self): | |
|
||
@property | ||
def _constructor_expanddim(self): | ||
# TODO: Raise NotImplementedError or change note in extending.rst | ||
from pandas.core.panel import Panel | ||
return Panel | ||
raise NotImplementedError("Not supported for DataFrames!") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The TODO mentions changing the docs extending.rst but that looks to have already been done |
||
|
||
# ---------------------------------------------------------------------- | ||
# Constructors | ||
|
@@ -1934,22 +1932,6 @@ def to_sparse(self, fill_value=None, kind='block'): | |
columns=self.columns, default_kind=kind, | ||
default_fill_value=fill_value) | ||
|
||
def to_panel(self): | ||
""" | ||
Transform long (stacked) format (DataFrame) into wide (3D, Panel) | ||
format. | ||
|
||
.. deprecated:: 0.20.0 | ||
|
||
Currently the index of the DataFrame must be a 2-level MultiIndex. This | ||
may be generalized later | ||
|
||
Returns | ||
------- | ||
Panel | ||
""" | ||
raise NotImplementedError("Panel is being removed in pandas 0.25.0.") | ||
|
||
@deprecate_kwarg(old_arg_name='encoding', new_arg_name=None) | ||
def to_stata(self, fname, convert_dates=None, write_index=True, | ||
encoding="latin-1", byteorder=None, time_stamp=None, | ||
|
@@ -6638,8 +6620,7 @@ def append(self, other, ignore_index=False, | |
|
||
See Also | ||
-------- | ||
concat : General function to concatenate DataFrame, Series | ||
or Panel objects. | ||
concat : General function to concatenate DataFrame or Series objects. | ||
|
||
Notes | ||
----- | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This previously was only modifying the exception message for Panel objects before raising again, so I simplified to just remove the try...except altogether and let it raise as is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it’s a one liner now, Is this still needed as a separate function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea could probably just call this directly now; I'll give it a look tonight and repush