-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
CLN: Panel reference from documentation #25649
Conversation
@@ -280,7 +280,7 @@ Property Attributes ``Series`` ``DataFrame`` | |||
=========================== ======================= ============= | |||
``_constructor`` ``Series`` ``DataFrame`` | |||
``_constructor_sliced`` ``NotImplementedError`` ``Series`` | |||
``_constructor_expanddim`` ``DataFrame`` ``Panel`` | |||
``_constructor_expanddim`` ``DataFrame`` ``NotImplementedError`` |
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 is not true yet, but I would think this would raise a NotImplementedError
once panel is removed?
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.
Makes sense to me. FYI there's a call above this for to_panel
I imagine we want to remove
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.
Nice catch. Removed.
Codecov Report
@@ Coverage Diff @@
## master #25649 +/- ##
==========================================
- Coverage 91.26% 91.26% -0.01%
==========================================
Files 173 173
Lines 52968 52968
==========================================
- Hits 48340 48339 -1
- Misses 4628 4629 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #25649 +/- ##
==========================================
- Coverage 91.26% 91.26% -0.01%
==========================================
Files 173 173
Lines 52982 52982
==========================================
- Hits 48356 48355 -1
- Misses 4626 4627 +1
Continue to review full report at Codecov.
|
@@ -280,7 +280,7 @@ Property Attributes ``Series`` ``DataFrame`` | |||
=========================== ======================= ============= | |||
``_constructor`` ``Series`` ``DataFrame`` | |||
``_constructor_sliced`` ``NotImplementedError`` ``Series`` | |||
``_constructor_expanddim`` ``DataFrame`` ``Panel`` | |||
``_constructor_expanddim`` ``DataFrame`` ``NotImplementedError`` |
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.
Makes sense to me. FYI there's a call above this for to_panel
I imagine we want to remove
|
||
For example: | ||
|
||
.. ipython:: python | ||
|
||
for item, frame in wp.iteritems(): | ||
for item, frame in df.iteritems(): |
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.
Makes sense though was this not failing CI before?
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.
wp
was a Panel defined beforehand (now removed).
doc/source/user_guide/merging.rst
Outdated
@@ -1284,8 +1284,8 @@ similarly. | |||
|
|||
.. _merging.multiple_join: | |||
|
|||
Joining multiple DataFrame or Panel objects | |||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |||
Joining multiple DataFrame |
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.
DataFrames
@@ -369,6 +369,7 @@ def _constructor(self): | |||
|
|||
@property | |||
def _constructor_expanddim(self): | |||
# TODO: Raise NotImplementedError or change note in extending.rst |
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.
can you add a todo on the Panel issue
lgtm. ping on green. |
All green. |
Thoughts on keeping a small piece of panel.rst around saying "Panel was removed in pandas 0.25.0. See for documentation?". That would at least avoid breaking links for people pointing to |
The doc build is broken here. It doesn't look like to be related to the changes in this PR (a tornado / jupyter compatibility), although I don't see it yet on other PRs on travis. But anyway, I would wait with merging until that is fixed (opening a PR shortly) |
|
||
# limiting the search | ||
store.select('wp', "major_axis>20000102 & minor_axis=['A', 'B']", | ||
start=0, stop=10) |
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.
There is still a store.remove('wp', 'major_axis > 20000102')
somewhere below (see the travis log output)
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.
>>>-------------------------------------------------------------------------
Exception in /home/travis/build/pandas-dev/pandas/doc/source/user_guide/io.rst at block ending on line 4230
Specify :okexcept: as an option in the ipython:: block to suppress this message
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-480-77cd4accde3f> in <module>
----> 1 store.remove('wp', 'major_axis > 20000102')
~/build/pandas-dev/pandas/pandas/io/pytables.py in remove(self, key, where, start, stop)
901 where = _ensure_term(where, scope_level=1)
902 try:
--> 903 s = self.get_storer(key)
904 except KeyError:
905 # the key is not a valid store, re-raising KeyError
~/build/pandas-dev/pandas/pandas/io/pytables.py in get_storer(self, key)
1155 group = self.get_node(key)
1156 if group is None:
-> 1157 raise KeyError('No object named {key} in the file'.format(key=key))
1158
1159 s = self._create_storer(group)
KeyError: 'No object named wp in the file'
<<<-------------------------------------------------------------------------
>>>-------------------------------------------------------------------------
Exception in /home/travis/build/pandas-dev/pandas/doc/source/user_guide/io.rst at block ending on line 4230
Specify :okexcept: as an option in the ipython:: block to suppress this message
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-481-53221ddff055> in <module>
----> 1 store.select('wp')
~/build/pandas-dev/pandas/pandas/io/pytables.py in select(self, key, where, start, stop, columns, iterator, chunksize, auto_close, **kwargs)
709 group = self.get_node(key)
710 if group is None:
--> 711 raise KeyError('No object named {key} in the file'.format(key=key))
712
713 # create the storer and axes
KeyError: 'No object named wp in the file'
<<<-------------------------------------------------------------------------
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.
Thanks. Removed.
Hmm, just restarting the build also seems to have fixed it. Some additional warnings about no longer existing labels from the logs that should be fixed:
|
doc/source/reference/panel.rst
Outdated
Panel.to_sparse | ||
Panel.to_frame | ||
Panel.to_clipboard | ||
Panel was removed in 0.25.0. |
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.
There's no entry in the 0.25.0 whatsnew to reference yet.
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.
you can create a warning section in whatsnew 0.25 (near the top) so we have a reference for it
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.
@mroeschke if you can do this can merge this (you might also want to have a link to the 0.24.x version of the docs)
Kept |
doc/source/reference/panel.rst
Outdated
Panel.to_sparse | ||
Panel.to_frame | ||
Panel.to_clipboard | ||
Panel was removed in 0.25.0. |
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.
you can create a warning section in whatsnew 0.25 (near the top) so we have a reference for it
thanks @mroeschke pls review built docs for clarity of this patch. |
* upstream/master: (55 commits) PERF: Improve performance of StataReader (pandas-dev#25780) Speed up tokenizing of a row in csv and xstrtod parsing (pandas-dev#25784) BUG: Fix _binop for operators for serials which has more than one returns (divmod/rdivmod). (pandas-dev#25588) BUG-24971 copying blocks also considers ndim (pandas-dev#25521) CLN: Panel reference from documentation (pandas-dev#25649) ENH: Quoting column names containing spaces with backticks to use them in query and eval. (pandas-dev#24955) BUG: reading windows utf8 filenames in py3.6 (pandas-dev#25769) DOC: clean bug fix section in whatsnew (pandas-dev#25792) DOC: Fixed PeriodArray api ref (pandas-dev#25526) Move locale code out of tm, into _config (pandas-dev#25757) Unpin pycodestyle (pandas-dev#25789) Add test for rdivmod on EA array (GH23287) (pandas-dev#24047) ENH: Support datetime.timezone objects (pandas-dev#25065) Cython language level 3 (pandas-dev#24538) API: concat on sparse values (pandas-dev#25719) TST: assert_produces_warning works with filterwarnings (pandas-dev#25721) make core.config self-contained (pandas-dev#25613) CLN: replace %s syntax with .format in pandas.io.parsers (pandas-dev#24721) TST: Check pytables<3.5.1 when skipping (pandas-dev#25773) DOC: Fix typo in docstring of DataFrame.memory_usage (pandas-dev#25770) ...
xref #25632
I didn't remove Panel reference from the whatsnew docs. Figured they should still be kept there for users who install older versions.