8000 API: Deprecate renamae_axis and reindex_axis by TomAugspurger · Pull Request #17842 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

API: Deprecate renamae_axis and reindex_axis #17842

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 9 commits into from
Oct 11, 2017
Prev Previous commit
Next Next commit
fixup! API: Deprecate renamae_axis and reindex_axis
  • Loading branch information
TomAugspurger committed Oct 10, 2017
commit f40875bed6b773265258769e8217bb005d45b34c
4 changes: 2 additions & 2 deletions pandas/io/pytables.py
Original file line number Diff line number Diff line change
Expand Up @@ -3493,15 +3493,15 @@ def get_blk_items(mgr, blocks):
data_columns = self.validate_data_columns(
data_columns, min_itemsize)
if len(data_columns):
mgr = block_obj.reindex_axis(
mgr = block_obj.reindex(
Index(axis_labels).difference(Index(data_columns)),
axis=axis
)._data

blocks = list(mgr.blocks)
blk_items = get_blk_items(mgr, blocks)
for c in data_columns:
mgr = block_obj.reindex_axis([c], axis=axis)._data
mgr = block_obj.reindex([c], axis=axis)._data
blocks.extend(mgr.blocks)
blk_items.extend(get_blk_items(mgr, mgr.blocks))

Expand Down
0