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

CLN: Panel reference from documentation #25649

Merged
merged 14 commits into from
Mar 20, 2019

Conversation

mroeschke
Copy link
Member

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.

@@ -280,7 +280,7 @@ Property Attributes ``Series`` ``DataFrame``
=========================== ======================= =============
``_constructor`` ``Series`` ``DataFrame``
``_constructor_sliced`` ``NotImplementedError`` ``Series``
``_constructor_expanddim`` ``DataFrame`` ``Panel``
``_constructor_expanddim`` ``DataFrame`` ``NotImplementedError``
Copy link
Member Author

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?

Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. Removed.

@codecov
Copy link

codecov bot commented Mar 11, 2019

Codecov Report

Merging #25649 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Flag Coverage Δ
#multiple 89.83% <ø> (ø) ⬆️
#single 41.71% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/util/testing.py 87.57% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f886139...92ec876. Read the comment docs.

@codecov
Copy link

codecov bot commented Mar 11, 2019

Codecov Report

Merging #25649 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Flag Coverage Δ
#multiple 89.83% <ø> (ø) ⬆️
#single 41.76% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/frame.py 96.79% <ø> (ø) ⬆️
pandas/util/testing.py 89.3% <0%> (-0.11%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4663951...8829954. Read the comment docs.

@@ -280,7 +280,7 @@ Property Attributes ``Series`` ``DataFrame``
=========================== ======================= =============
``_constructor`` ``Series`` ``DataFrame``
``_constructor_sliced`` ``NotImplementedError`` ``Series``
``_constructor_expanddim`` ``DataFrame`` ``Panel``
``_constructor_expanddim`` ``DataFrame`` ``NotImplementedError``
Copy link
Member

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():
Copy link
Member

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?

Copy link
Member Author

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).

@@ -1284,8 +1284,8 @@ similarly.

.. _merging.multiple_join:

Joining multiple DataFrame or Panel objects
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Joining multiple DataFrame
Copy link
Member

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
Copy link
Contributor

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

@jreback jreback added this to the 0.25.0 milestone Mar 13, 2019
@jreback
Copy link
Contributor

jreback commented Mar 13, 2019

lgtm. ping on green.

@mroeschke
Copy link
Member Author

All green.

@TomAugspurger
Copy link
Contributor

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 /stable.

@jorisvandenbossche
Copy link
Member

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)
Copy link
Member

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)

Copy link
Member

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'
<<<-------------------------------------------------------------------------

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Removed.

@jorisvandenbossche
Copy link
Member

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:

/home/travis/build/pandas-dev/pandas/doc/source/whatsnew/v0.20.0.rst:1372: WARNING: undefined label: dsintro.deprecate_panel (if the link has no caption the label must precede a section header)
/home/travis/build/pandas-dev/pandas/doc/source/whatsnew/v0.23.0.rst:660: WARNING: undefined label: dsintro.deprecate_panel (if the link has no caption the label must precede a section header)
/home/travis/build/pandas-dev/pandas/doc/source/whatsnew/v0.6.0.rst:42: WARNING: undefined label: basics.panel (if the link has no caption the label must precede a section header)
/home/travis/build/pandas-dev/pandas/doc/source/whatsnew/v0.7.0.rst:63: WARNING: undefined label: dsintro.to_panel (if the link has no caption the label must precede a section header)
/home/travis/build/pandas-dev/pandas/doc/source/whatsnew/v0.7.0.rst:75: WARNING: undefined label: dsintro.panel_item_selection (if the link has no caption the label must precede a section header)�[39;49;00m
/home/travis/build/pandas-dev/pandas/doc/source/whatsnew/v0.7.0.rst:99: WARNING: undefined label: dsintro.panel_item_selection (if the link has no caption the label must precede a section header)

Panel.to_sparse
Panel.to_frame
Panel.to_clipboard
Panel was removed in 0.25.0.
Copy link
Member Author

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.

Copy link
Contributor

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

Copy link
Contributor

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)

@mroeschke
Copy link
Member Author

Kept panel.rst and left a note regarding the removal and should have fixed all the errant doc warnings.

Panel.to_sparse
Panel.to_frame
Panel.to_clipboard
Panel was removed in 0.25.0.
Copy link
Contributor

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

@jreback jreback merged commit ba7826f into pandas-dev:master Mar 20, 2019
@jreback
Copy link
Contributor

jreback commented Mar 20, 2019

thanks @mroeschke

pls review built docs for clarity of this patch.

@mroeschke mroeschke deleted the remove_panel_doc branch March 20, 2019 16:23
thoo added a commit to thoo/pandas that referenced this pull request Mar 20, 2019
* 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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants