Skip to content

Commit 0538c43

Browse files
committed
Merge pull request #3864 from jreback/concat_single_item
CLN: avoid Unboundlocal error in tools/merge/_get_concatenated_data (GH3833)
2 parents 45d298d + f3b70e0 commit 0538c43

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/tools/merge.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -984,11 +984,11 @@ def _prepare_blocks(self):
984984
return blockmaps, reindexed_data
985985

986986
def _get_concatenated_data(self):
987-
try:
988-
# need to conform to same other (joined) axes for block join
989-
blockmaps, rdata = self._prepare_blocks()
990-
kinds = _get_all_block_kinds(blockmaps)
987+
# need to conform to same other (joined) axes for block join
988+
blockmaps, rdata = self._prepare_blocks()
989+
kinds = _get_all_block_kinds(blockmaps)
991990

991+
try:
992992
new_blocks = []
993993
for kind in kinds:
994994
klass_blocks = [mapping.get(kind) for mapping in blockmaps]

0 commit comments

Comments
 (0)