Skip to content

Commit 9aa260d

Browse files
Changing axis handling to depend on object passed
1 parent 49442be commit 9aa260d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/tools/merge.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,10 @@ def __init__(self, objs, axis=0, join='outer', join_axes=None,
14121412
self.objs = objs
14131413

14141414
# Standardize axis parameter to int
1415-
axis = DataFrame()._get_axis_number(axis)
1415+
if isinstance(sample, Series):
1416+
axis = DataFrame()._get_axis_number(axis)
1417+
else:
1418+
axis = sample._get_axis_number(axis)
14161419

14171420
# Need to flip BlockManager axis in the DataFrame special case
14181421
self._is_frame = isinstance(sample, DataFrame)

0 commit comments

Comments
 (0)