Skip to content
Merged
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/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ Improvements to existing features
using ``DataFrame.to_csv`` (:issue:`5414`, :issue:`4528`)
- perf improvements in DataFrame construction with certain offsets, by removing faulty caching
(e.g. MonthEnd,BusinessMonthEnd), (:issue:`6479`)
- perf improvements in single-dtyped indexing (:issue:`6484`)

.. _release.bug_fixes-0.14.0:

Expand Down
5 changes: 4 additions & 1 deletion pandas/core/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -3402,8 +3402,11 @@ def reindex_items(self, new_items, indexer=None, copy=True,
# unique
if self.axes[0].is_unique and new_items.is_unique:

# ok to use the global indexer if only 1 block
i = indexer if len(self.blocks) == 1 else None

for block in self.blocks:
blk = block.reindex_items_from(new_items, copy=copy)
blk = block.reindex_items_from(new_items, indexer=i, copy=copy)
new_blocks.extend(_valid_blocks(blk))

# non-unique
Expand Down