Skip to content

API: Drop DataFrame.iterkv() #15650

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.20.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ Other API Changes
- Reorganization of timeseries development tests (:issue:`14854`)
- Specific support for ``copy.copy()`` and ``copy.deepcopy()`` functions on NDFrame objects (:issue:`15444`)
- ``Series.sort_values()`` accepts a one element list of bool for consistency with the behavior of ``DataFrame.sort_values()`` (:issue:`15604`)
- ``DataFrame.iterkv()`` has been removed in favor of ``DataFrame.iteritems()`` (:issue:`11121`)

.. _whatsnew_0200.deprecations:

Expand Down
10 changes: 0 additions & 10 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,16 +899,6 @@ def iteritems(self):
for h in self._info_axis:
yield h, self[h]

# originally used to get around 2to3's changes to iteritems.
# Now unnecessary. Sidenote: don't want to deprecate this for a while,
# otherwise libraries that use 2to3 will have issues.
def iterkv(self, *args, **kwargs):
"iteritems alias used to get around 2to3. Deprecated"
warnings.warn("iterkv is deprecated and will be removed in a future "
"release, use ``iteritems`` instead.", FutureWarning,
stacklevel=2)
return self.iteritems(*args, **kwargs)

def __len__(self):
"""Returns length of info axis"""
return len(self._info_axis)
Expand Down
4 changes: 0 additions & 4 deletions pandas/tests/frame/test_misc_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,6 @@ def test_repr_with_mi_nat(self):
exp = ' X\nNaT a 1\n2013-01-01 b 2'
self.assertEqual(res, exp)

def test_iterkv_deprecation(self):
with tm.assert_produces_warning(FutureWarning):
self.mixed_float.iterkv()

def test_iterkv_names(self):
for k, v in compat.iteritems(self.mixed_frame):
self.assertEqual(v.name, k)
Expand Down