Skip to content

Conversation

jbrockmendel
Copy link
Member

Reboots #29335.

@@ -433,6 +433,7 @@ or ``matplotlib.Axes.plot``. See :ref:`plotting.formatters` for more.
- Removed previously deprecated :func:`pandas.tseries.plotting.tsplot` (:issue:`18627`)
- Removed the previously deprecated ``reduce`` and ``broadcast`` arguments from :meth:`DataFrame.apply` (:issue:`18577`)
- Removed the previously deprecated ``assert_raises_regex`` function in ``pandas.util.testing`` (:issue:`29174`)
- Removed the previously deprecated ``FrozenNDArray`` class in ``pandas.core.indexes.frozen`` (:issue:`29335`)
Copy link
Contributor

Choose a reason for hiding this comment

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

extra space

@@ -810,6 +811,13 @@ def set_levels(self, levels, level=None, inplace=False, verify_integrity=True):
def codes(self):
return self._codes

def _coerce(self, array_like, categories, copy=False):
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 make this a free function, add types & a doc-string

@jreback jreback added the Deprecate Functionality to remove in pandas label Nov 26, 2019
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

nice lgtm. Thanks for picking this up!

@WillAyd WillAyd added this to the 1.0 milestone Nov 27, 2019
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

small request, rebase (i know need to rebase almost all.....)

@jbrockmendel
Copy link
Member Author

rebased+green

@@ -1095,7 +1094,8 @@ def _format_native_types(self, na_rep="nan", **kwargs):
if mask.any():
nan_index = len(level)
level = np.append(level, na_rep)
level_codes = level_codes.values()
assert not level_codes.flags.writeable # i.e. copy is needed
Copy link
Contributor

Choose a reason for hiding this comment

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

shoulnt' you be calling _coerce_indexer_frozen here (with copy=True)?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, _coerce_indexer_frozen returns an ndarrary that is not writeable, whereas here we have a non-writeable ndarray and need to get a writeable copy

@jreback jreback merged commit 9dd1b50 into pandas-dev:master Nov 29, 2019
@jreback
Copy link
Contributor

jreback commented Nov 29, 2019

thanks @jbrockmendel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants